This bug is generally visible at the deployment time for ASP.Net 2.0 applications which is built on the Enterprise Library 2.0 (Jan 2006). Specially this will occur when we are deploying in shared hosting (eg: godaddy..etc). The error message screen shot is given below.
In the internet everybody suggested to put the <trust level=”Low” originUrl=”" /> in the web.config file. But that will not work.
Actually the problem is that the applications that are built using the Enterprise Library – January 2006 and that run on the Microsoft .NET Framework 2.0 require use of the full trust security level. Enterprise Library – January 2006 was designed for use in environments where it can run with full trust permissions. Some features in Enterprise Library use various .NET capabilities, such as accessing performance counters and the Windows Event Log, which require certain permissions that are not typically granted in partial trust. The demands for these permissions are made at the assembly level, which means that .NET will not allow the code to run at all, even though only a small number of calls and code paths may require these permissions.
But many users wanted to use Enterprise Library in partial trust scenarios. The hosting providers are giving the ASP.NET 2.0 environments using medium or custom security trust policies because Partial trust is a good choice for Web sites and other environments where multiple applications are hosted on a server that supports multiple application owners.
To resolve these issues a patch was released for Enterprise Library – January 2006. That is Patch 2554 which changes the behavior of Enterprise Library – January 2006 so that you can run it under the partial trust model by isolating permissions demands only to the code that really requires it, and, where possible, support “graceful degradation” where these permissions cannot be obtained. The permissions required to use Enterprise Library are kept to a minimum.
To download the Patch 2554 , follow the below link
http://entlib.codeplex.com/releases/view/1339
After downloading the patch follow the below steps.
- Unzip the package , we can find the two folders “Src“, “UnitTests“.
- Copy and overwrite the both folders in to the location <<Installation path>>/Microsoft Enterprise Library January 2006.
- Run the batch file “BuildLibrary.bat” in that folder, so that the new source code will be compiled and the ‘dll‘ will generate.
- Run the batch file “CopyAssemblies.bat” in that folder, so that all the ‘dll‘ files will be copied to the <<Installation path>>/Microsoft Enterprise Library January 2006/bin location.
- Now take new references to the application and build the application and deploy it.
These are the steps to follow to resolve this error.


What a great resource!
Valuable info. Lucky me I found your site by accident, I bookmarked it.