954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Request for the permission of type 'System.Web.AspNetHostingPermission' [...] failed.

Keywords:
ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box

I've betting the following for days... it's driving me insane:

Server Error in '/' Application.
Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified
using the exception stack trace below.

The referenced token can be found here:
ConnectionRef="strMRConn_Test_System (Web.config)" [...]
ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
This is in my XSD (DataSet) file.

I believe this is a compile error (not an RTE), as the default page has no connection to SQL and it's plain HTML. Yet I can buil successfully! Running (w/ or w/out debugging won't work).

The ASPNET account of the IIS6 server has full permission on the site folders (under wwwroot).

PLEASE help,
AnalogKid17

AnalogKid17
Newbie Poster
1 post since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

Did you ever resolve this issue? If so, how?

tigris7
Newbie Poster
1 post since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

This exception is occurs when user run an application that attempts to access their login information from a different machine. My method for getting around this was simple: move the executable to the user's machine.

jchalfant
Newbie Poster
1 post since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You