简体   繁体   中英

How do I configure asp.net on IIS 7 to read/write files on a file server?

I have an ASP.NET 4 web site running on Windows Server 2008 SP 2, IIS 7. I have a separate file server, also running Windows Server 2008 located on the LAN. This file server has a folder with images. These are the only two machines and there is no domain (at least net yet).

I need to be able to have the ASP.NET application read and write to files on the file server. This means that I need to configure some common accounts for both and have my ASP.NET app use it but I am not sure where to do this as there seems to be a dozen places (user accounts, iis, web site config, application pool, etc).

Can you point me to some instructions on how to do this? The only ones I have found are either for IIS 6 or don't go into enough details.

Yes, you'll need to create common Windows accounts on both machines, and give it write access to the folder on your file server.

To make your site run under that account, open IIS Manager and select the application pool your site is running in; click Advanced settings. Make sure Managed Pipeline Mode is set to Integrated, then edit the Identity property to run under a custom account and enter the username and password.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM