Server asp.net permission settings and Solutions
My server environment: WIN 2003
ASP. NET is a little different from ASP in terms of setting permissions, and it cannot be run even if it is set incorrectly. All the answers found on the Internet are very junk. None of them can be used. The following is my experience after self-setup and the problems I encountered, and I will share them with you.
ASP. NET requires the USERS Group permission, because I have set the permission many times and found that the website is not running, it is very depressing. The following is a little solution based on the problems that have occurred, so that your ASP. NET can run ..
Question 1:
Part of path "C: \" is not found.
Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.
Exception details: System. IO. DirectoryNotFoundException: Part of the path "C: \" is not found.
Solution:
Add the Users Group read permission to drive C.
I have tried it: I can access it after adding the Users read permission to drive C, but due to server security issues, I removed the UserS Group again (think that some folders under drive C should be added to the UserS permission ). After removing the USERS group, the successive problems are displayed in different ways, as described in the following section, and then solved one by one.
Question 2:
After the logon window is displayed, the following error occurs: HTTP Error 401.3-unauthorized: access to requested resources is denied due to ACL settings.
Or an HTTP 401.1 error occurs.
Solution:
1. First, check whether the password in your "Identity Authentication and Access Control" for anonymous use of the following windows User Accounts "is correct, you can also right-click your website and choose "permission" to check if it has been added to this page.
If this is the case in the first method, the folder permission is set.
Add the Users permission on windows.
Question 3:
If garbled characters appear on your entire website
Solution:
Add the users Group read permission to drive C windows.
Question 4:
Compilation Error
Note: An error occurs during compilation of resources required to provide services to this request. Check the following error details and modify the source code as appropriate.
Compiler error message: CS0016: failed to write the output file "c: \ windows \ Microsoft. NET \ work \ v1.1.4322 \ Temporary ASP. NET Files \ root \ 345513e7 \ 86f1794a \ fvmzvzp7.dll "--" Access denied. "
Solution:
Add the Users Group's read, write, and modify permissions to temp on drive C windows.
Question 5:
Compilation Error
Note: An error occurs during compilation of resources required to provide services to this request. Check the following error details and modify the source code as appropriate.
Compiler error message: the compiler fails. The error code is 128.
Solution:
Add the Users Group read permission to System32 in windows Drive C.
Question 6:
Runtime error
Note: An application error occurs on the server. The current custom error settings of this application Disable remote viewing of detailed information about application errors (for security reasons ). However, you can view it in a browser running on the local server computer.
Details: to enable others to view details of this specific error message on a remote computer, go to the "Web. create a <mermerrors> tag in the config file. Set the "mode" attribute marked by <customErrors> to "Off ".
<! -- Web. Config configuration file -->
<Configuration>
<System. web>
<CustomErrors mode = "Off"/>
</System. web>
</Configuration>
Note: Modify the defaultRedirect attribute of the <customErrors> Configuration tag of the application to point to the URL of the custom error page, you can use a custom error page to replace the current error page.
<! -- Web. Config configuration file -->
<Configuration>
<System. web>
<CustomErrors mode = "RemoteOnly" defaultRedirect = "mycustompage.htm"/>
</System. web>
</Configuration>
Solution:
Right-click the site and add the IIS_WPG Group read permission to the permission.
Summary:
Windows temp System32 requires the users permission.
Windows read temp read, write System32 read
The site permission must be added with IIS_WPG read permission.
Therefore, the server security is much lower ,,
Question 7
An error occurs during compilation of resources required to provide services to this request. Check the following error details and modify the source code as appropriate.
When compiling a website in the built-in environment of VS2005, the following error occurs: "an error occurs during compilation of resources required to provide services to this request. Please check the following specific error details and modify the source code appropriately. "This error has been sent to the Internet baidu. The following solution is available:
Modify the permission of the Directory and add "network service" to allow it to control the directory.
Modify account .htm of the Network/IIS/iisservice> the default account of the IIS service is "local system"
After verification, method 2 is feasible and method 1 fails. However, method 2 may cause insecure IIS running, so this method is not suitable.
I tried it according to the solution, but I didn't succeed. I suddenly thought that yesterday I installed mcafee because of anti-virus, and checked the mcafee logs. There are a few of them:
C: \ Program Files \ Internet Explorer \ iexplore.exe \ REGISTRY \ MACHINE \ SOFTWARE \ Classes \. torrent \ @ anti-virus maximum protection: Disable registration of modifying all file extensions
C: \ windows \ system32 \ inetsrv \ w3wp.exe C: \ WINDOWS \ TEMP \ wda3zurp. dll universal maximum protection: do not create executable files in the Windows folder
It should be a problem here. Delete the above two rules and the compilation is successful :)
Question 8
Error 1 "ASP. login_aspx.GetTypeHashCode () ": no suitable method is found to override c: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ Temporary ASP. NET Files \ clim \ 22c580cf \ 181f2416 \ App_Web_iiv2pnyq.8.cs
Error 2 "ASP. login_aspx.ProcessRequest (System. web. httpContext) ": no suitable method is found to override c: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ Temporary ASP. NET Files \ clim \ 22c580cf \ 181f2416 \ App_Web_iiv2pnyq.8.cs
Error 3 "ASP. login_aspx "does not implement the interface member" System. web. IHttpHandler. isReusable "c: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ Temporary ASP. NET Files \ clim \ 22c580cf \ 181f2416 \ App_Web_iiv2pnyq.8.cs
Solution: Check whether the method name, class name, and namespace are consistent.