The deployment of a Web site today, under Net 4.0 is normal, but under 2.0 found an error: System.Security.SecurityException, the error message is as follows:
Security exception
Description: An application attempted to perform an operation that was not allowed by the security policy. To grant the required permissions for this application, contact your system administrator, or change the trust level of the application in the configuration file.
Exception Details: System.Security.SecurityException: Request "System.Web.AspNetHostingPermission, System, version=2.0.0.0, culture= Neutral, publickeytoken=b77a5c561934e089 "type of permission has failed.
SOURCE Error:
An unhandled exception was generated during the execution of the current WEB request. You can use the following exception stack trace information to determine information about the cause of the exception and where it occurred.
At first, I thought it was a permissions issue, giving the network to C:\WINDOWS\temp and C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP. SERVICE, ASPNET Modify permissions, no results, or the same error.
Finally, the following methods are resolved:
The Web. config configuration is as follows:
<authorization>
<allow users= "*"/>
</authorization>
<identity impersonate= "true" Username= "Nuc" password= ""/>
Username= "Nuc" password= "" is the operating system login name and password