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 . 


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 -

If you are not able to resolve this issue then a descriptive explanation is also provided on this blog post -


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 .



Getting Started with 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 :


Error in 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 code in a sub folder like 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 and it will start working . 




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;<>&gt;">
<network host="<hostname>" port="25" userName="" password="" />

smtp , ,

Welcome to Mymezon

6. November 2012

I will post my day to day encounters while i code my latest project