Assume there are two servers: A and B, where A is a Web server (ip:192.123.1.1, a server for IIS publishers), and B is a file server (ip:192.123.2.2)
- Create a shared folder under a disk in file Server B docshare, and create a user on that server, such as Docuser, and assign this user read and write access to the shared folder
- The same user, such as Docuser, is also created in Web Server A, and the password must be consistent with the Docuser in B. and add user Docuser to the IIS_WPG user group
- Create a new application pool Docpool, and Set permissions authentication, enter user name Docuser and password.
- Set IIS published program's application pool to Docpool
- Add a virtual directory under the root of the program that is published by IIS, the name is files, and the virtual directory maps to the shared directory path of server B, such as: \\192.123.2.2\DocShare set a specific user access, enter the user name Docuser, password.
- In the program code, the save path to the settings file is Server.MapPath ("Files") : The path to the virtual directory.
An implementation that stores uploaded attachments to another file server in ASP.