RG-3
RG-3

Reputation: 6188

Server Error in Application

Whenever I am viewing my file (file is located in shared drive) to a browser, I am getting this error:

Server Error in '/Test' 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.

I contacted the System Admin, he said he has given the full access rights to my PC. What is going wrong here?

Upvotes: 2

Views: 2220

Answers (1)

theChrisKent
theChrisKent

Reputation: 15099

By default you can't host ASP.NET pages from a shared drive since this is an untrusted location. You will need to edit your .NET configuration to allow this location. You can find a quick guide here (The first answer): http://forums.asp.net/t/1371394.aspx

A quick test before doing that is to copy the project locally and run it. If everything works, then that is your problem. If it is important to keep the project on the shared drive you will have to follow the above steps to make it a trusted location.

Upvotes: 5

Related Questions