The problem is as follows:
Vs2003 is installed in Windows 2003. When running a web application, an error occurs: access to the path "D: \ temp1 \ mytest.txt" is denied.
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. unauthorizedaccessexception: Access to path "D: \ temp1 \ mytest.txt" is denied.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Solution 1
Add the network service account to the directory for read/write operations,
In IIS 6.0, network service is used in the default application pool,
Therefore, the network serviceaccount is used to run the w3wp.exe process in the process,
When running vs 2003, we need to perform read/write operations on a directory,
After reading the folder and finding that there is no network service, add the account and select "Full Control" to solve the problem,
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Solution 2
In iis6.0, change the default application pool --> properties --> label to "local system". This problem can also be solved.
######################################## #######################################
What is an application pool? This is a brand new concept of Microsoft: The application pool is a configuration that links one or more applications to one or more worker processes. Because applications in the application pool are separated from other applications by working process boundaries, applications in an application pool will not be affected by problems caused by applications in other application pools.
Windows 2003 supports two working modes at the same time. The default is ISS 6.0 Working Process Isolation Mode. Working Process Isolation Mode prevents one application or site from being stopped and affects another application or site, greatly enhancing the reliability of IIS. So how to set two working modes?
Start IIS manager, right-click the website, and select "properties" to open the Properties dialog box (figure 1 ). In IIS 6.0 Working Process Isolation Mode, all application code runs in the isolation environment. How are they isolated? In Windows 2003, an application pool is added. The working process isolation mode allows you to create multiple application pools. Each application pool can have different configurations. Because these application pools receive their requests directly from the kernel rather than the WWW Service, the performance and reliability are enhanced. To isolate Web applications running on the same computer but belonging to different websites, you need to create a separate application pool for each website.
Create application pool
In IIS manager, open the local computer, right-click application pool, and choose new application pool (the application pool can be created only in Working Process Isolation Mode ). In the application pool Name box, enter a new application pool name. If the ID (for example, apppool #1) that appears in the "application pool ID" box is not what you want, you can rename it. If you click "use existing application pool as template", right-click the application pool you want to use as the template in the "application pool name" box. Click [OK].
Assign application pool
In IIS manager, right-click the application for which you want to assign an application pool, and then click Properties ". Click the "home directory" tab to confirm whether the "Application name" of the directory or virtual directory you are assigning has been filled in. If the "Application name" box is not yet filled, click "CREATE" and enter a name.
In the application pool list box, select the name of the application pool you want to assign to it. Click [OK].