How does the ASP.NET program in Win2003 accesses the UNC path?

xiaoxiao2021-03-05  49

There will often be some ASP.NET programs that need to be written or read in the file system. If the path to the program is the file path (C: / DOCTEMP) in this machine, it is better to configure, as long as the DOCTEMP's permissions are set to allow the ASP.NET to run account (IIS6 default "NetWork Service", IIS5 is default "ASPNET") can read and write. But if the file is required to be placed on the UNC (network path, such as "// 10.101.11.111/doctemp"), it is troublesome. Because the shared files of Window2003.ASP.NET run accounts are not accessible to the network path. Because the password of the NetWork Service and the application server's NetWork Service on the file server is different (all dynamically generated). But still there is still a way to solve it.

If your two servers are in the same domain, build a domain account and add this account to IIS_WPG. At the same time IIS built a program running pool with this domain account to run your ASP.NET program. The path on the file server also makes this domain account to share and access this shared path.

However, if your two servers are not in the same domain, they will build the same account on both servers (the password must also be the same). Add the account account of the web server to IIS_WPG, and IIS build a program running pool to run your ASP.NET program, and the file server can be shared and access to the account.

转载请注明原文地址:https://www.9cbs.com/read-32987.html

New Post(0)