The old revolution encountered new problems ASP. NET program access UNC path

Source: Internet
Author: User

There are often some Asp.netProgramYou need to write or read some content to the file system. If the path accessed by the program is the local file path (C: \ doctemp), the configuration is better, you only need to set the doctemp permission to allow the Asp.net Running Account (IIS6 uses "Network Service" by default, and iis5 uses "ASPnet" by default) to read and write. However, if the file needs to be placed in the UNC (network path, for example, "\ 10.101.11.111 \ doctemp") path, it will be troublesome. Because the file .asp.net running account shared by window2003 cannot access this network path. Because the passwords of the network service on the file server and the network service on the Application Server are different (both are dynamically generated ). But there is still a solution.

If both of your servers are in the same domain, create a domain account and add this account to iis_wpg. At the same time, IIS creates a program running pool and uses this domain account to run your Asp.net program. The path on the file server also specifies that this domain account can share and access this shared path.

However, if both of your servers are not in the same domain, create the same account on both servers (the same password is required ). Add the Web server account to iis_wpg, and use this domain account to run your Asp.net program to create a program running pool in IIS, on the file server, you can specify that this account has the sharing and access permissions.

But today, my colleague told me that this configuration cannot be solved, and the situation is very strange. After configuration, access the site on the server and upload and download attachments. However, if the access is performed on other clients, an error is reported that the UNC path cannot be accessed.

As a result, the remote server looked at the configuration and found no problem for a long time. The shared write and read permissions were all configured, And the NTFS security permissions on the hard disk were also configured. However, the server seems to have the following problems:

      1. In the event viewer, we found a system error from rxsmb "the Redirection Program cannot determine the link type".
      2. The IP address and public address of the heartbeat line in the configured NLB are in the same network segment and with the same mask

It is estimated that Windows cannot know which Nic should be taken when accessing the UNC path. Later, I asked my colleagues to remove NLB and reconfigure one of the servers to solve the problem. We will also track the situation and re-configure NLB to see if the same problem still exists.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.