Environment:
. NET Framework 2.0 + Microsoft Windows Server 2003 SP1 + iis6.0
Usage process:
Publish a website to a folder (website), set a virtual directory (website) in iis6.0, and direct its "local path" attribute to the published folder.
Compilation and running of ASP. NET 2.0 projects are successful, but the following two errors occur when you access the website based on the above settings. I checked the information online and found the solution. Collect and sort them out.
Error 1:
Configuration Error
Note: An error occurred while processing the configuration file required to provide services to the request. Check the following error details and modify the configuration file as appropriate. Analyzer error message: in ApplicationProgramIt is incorrect to use the Section registered as allowdefinition = 'machinetoapplication. This error may occur if the virtual directory is not configured as an application in IIS.
Solution: [1]
You need to set the virtual directory to an application in iis6.0.
The procedure is as follows:
(1) Enable IIS 6.0
(2) Select "Default web site ".
(3) Right-click the virtual directory to open its property page.
(4) Select "virtual directory" and select the project card
(5) Click "CREATE" and "Application name" next to the "application settings" attribute on this tab.
The value is changed from Gray to white, and its attribute value is automatically filled in.
In the preceding steps, set the virtual directory to an application.
Error 2:
Compilation Error
Note: An error occurs during compilation of resources required to provide services to this request. Check the following error details and modify them as appropriate.Source code.
Compiler error message: cs0016: failed to write the output file "C:/Windows/Microsoft. net/framework/v2.0.50727/Temporary ASP. net files/website/2204cb73/26c77319/App_GlobalResources.mcbv6w-k.dll "--" Access denied. "
Source error:
[No relevant source line]
Source File: row: 0
Show detailed compiler output:
... (Omitted)
Microsoft (r) Visual C #2005 compiler version 8.00.50727.42
For Microsoft (r) Windows (r) 2005 Framework 2.0.50727
Copyright (c) Microsoft Corporation 2001-2005. All rights reserved.
Error cs0016: failed to write the output file "C:/Windows/Microsoft. NET/framework/v2.0.50727/Temporary ASP. NET files/website/2204cb73/26c77319/App_GlobalResources.mcbv6w-k.dll" -- "Access denied. "
--------------------------------------------------------------------------------
Version: Microsoft. NET Framework Version: 2.0.50727.42; ASP. NET version: 2.0.50727.42
Solution: [2]
Set permissions for the Windows/TEMP directory of the system disk.
Solution:
(1) Open the windows/TEMP directory on the system disk.
(2) Right-click the Directory and select Properties.
(3) Select the "Security" option card and grant some permissions to the user's Network Service (if Win2000 is an Asp.net user. Specifically:
1. Read and run 2. List folder directories 3. Read. (If the error is still reported, grant the other permissions. :))
References:
[1] http://nt.discuz.net/showtopic.aspx? Topicid = 2735 & page = end
[2] http://www.cnblogs.com/lingyun_k/archive/2006/06/02/415494.html