Error: Cannot write configuration file due to insufficient permissions when trying to change .Net trust level from IIS Manger

29. November 2012

Error: Cannot write configuration file due to insufficient permissions

This error usually comes when you are using source control over your project and you have explicitly not check out your file for modifications . Try check out in source control software you are using and then copy the file to inetpub and try again the process of modifying .Net trust level from IIS manager , it should work now . 

IIS

SecurityException: That assembly does not allow partially trusted callers while using itextsharp dll

29. November 2012

When you are using itextsharp library on a shared web hosting server then you might get this type of error because of .net trust level being set to Medium . 

 

Now in order to resolve this issue you will have to rebuild the original dll source that is itextsharp source with a slight change in AssemblyInfo.cs 

You will have to Insert this Statement in it 

[assembly: System.Security.AllowPartiallyTrustedCallers]

And rebuild the same and reference the new dll and there wont be any error anymore . If you donot have source for itextsharp then you can download from this link - http://sourceforge.net/projects/itextsharp/?source=dlp

If you are not able to resolve this issue then a descriptive explanation is also provided on this blog post - http://www.ben-morris.com/allow-partially-trusted-callers-asp-net-shared-hosting-environments

OR

Click Here 

iTextSharp ,

How to Add Header and Footer to a PDF file using iTextSharp library in .net

28. November 2012

Below is a link to a very descriptive and easy to use code for adding Header and Footer in a PDF file while using the iTextSharp library . 

http://www.mazsoft.com/blog/post/2008/04/30/Code-sample-for-using-iTextSharp-PDF-library.aspx#

 

iTextSharp

Getting Started with asp.net MVC

19. November 2012

You can start your learning process through this link with an option provided to download free Visual Studio 2012 Express Edition with MVC 4 :

http://www.asp.net/mvc

ASP.NET MVC ,

Error in blogengine.net when placing it in sub directory of your hosting

6. November 2012

 

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. 

Causes : That basically means the web.config file supplied with BlogEngine.NET includes some settings that are application-level. The fact that you are seeing the error means that you have the blog off of the root directory of your site, probably like the following? When you place your blogengine.net code in a sub folder like yourdomain.com/blogs then it will throw an error 

Now in order to resolve this issue you will have to goto your hosting control panel and and select IIS Management . There will be an option to create a new AppPool . Create a new one and point it to your sub folder which is /blogs . After the creation process is done just reload your webpage on which you have blogengine.net and it will start working . 

 

 

BlogEngine.NET

How to add From Display name in web.config for smtp

6. November 2012

We will have to enter the below code in web.config . Just add the text you want to add in place of <name> :

 

<smtp from="<name>&lt;<email@domain.com>&gt;">
<network host="<hostname>" port="25" userName="" password="" />
</smtp>

smtp , ,

Welcome to Mymezon

6. November 2012

I will post my day to day encounters while i code my latest project www.sitrep.co.in