Security Exception : Request failed.

Need help? Post your questions here.

Moderator: moderators

Security Exception : Request failed.

Postby waterwereld » Fri Oct 16, 2009 1:20 pm

I have deployed my site to aa Sharedhosting provider but i get a Security Exception Please someone help me. I going crazy. On my local server is works fine. Also the Live DB works.

Code:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
var Countries = tblCountry.All();

foreach (var country in Countries)
{
Response.Write(country.CountryName + "<br>");
}
}
</script>



Stack Trace:


[SecurityException: Request failed.]
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +284
System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69
System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +150
System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +30
System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +40
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +123
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +54
waterwereld
 
Posts: 1
Joined: Fri Oct 16, 2009 1:18 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 20 guests