Posted by Alec on Wed, 01 Apr 2009, in ASP.NET C#
I stumbled upon an error when deploying a web application onto IIS7 running on Vista. After days of trying to solve, it's actually due to the fact that the application is set to medium trust but it actually needs Full Trust due to using Reflection in the code. There's not much to do unless the hosting provider allow me to change the trust level but apparently it seems like this is not possible. They're still trying to find out what they can do...
In the mean time, there's a good Wiki post here <a href="http://www.fbwiki.com/index.php?title=PartialTrustIssue">http://www.fbwiki.com/index.php?title=PartialTrustIssue</a> which explains the problem.
Apparently, it's because my application is using Data Access Application Block, which requires use of the full trust security level. Applying patch 2554 to the source allows applications to run under partial trust scenarios, for example, in a hosted ASP.NET environment. To solve that, download this:
http://www.codeplex.com/entlib/Release/ProjectReleases.aspx?ReleaseId=1339