简体   繁体   English

如何在IIS 7上配置asp.net以读取/写入文件服务器上的文件?

[英]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. 我有一个在Windows Server 2008 SP 2,IIS 7上运行的ASP.NET 4网站。我有一个单独的文件服务器,也运行在LAN上的Windows Server 2008。 This file server has a folder with images. 该文件服务器有一个包含图像的文件夹。 These are the only two machines and there is no domain (at least net yet). 这是仅有的两台计算机,并且没有域(至少是net)。

I need to be able to have the ASP.NET application read and write to files on the file server. 我需要能够使ASP.NET应用程序读写文件服务器上的文件。 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). 这意味着我需要为两者都配置一些通用帐户,并让我的ASP.NET应用程序使用它,但是我不确定在哪里进行此操作,因为似乎有十几个地方(用户帐户,iis,网站配置,应用程序池)等)。

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. 我发现的唯一内容是针对IIS 6的,或者没有提供足够的详细信息。

Yes, you'll need to create common Windows accounts on both machines, and give it write access to the folder on your file server. 是的,您需要在两台计算机上创建通用Windows帐户,并为其授予对文件服务器上文件夹的写访问权限。

To make your site run under that account, open IIS Manager and select the application pool your site is running in; 要使您的网站在该帐户下运行,请打开IIS管理器,然后选择您的网站在其中运行的应用程序池。 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. 确保将“托管管道模式”设置为“集成”,然后编辑“标识”属性以在自定义帐户下运行,然后输入用户名和密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何配置IIS或Web服务器以允许其读取和写入文件? - How do I configure IIS or the web server to allow it to read and write files? 如何在IIS6和asp.net中配置上载文件夹? 赢得服务器2003 SP2 - How do I configure a upload folder in IIS6 and asp.net? win server 2003 sp2 如何更新IIS和ASP.NET上的共享文件? - How do I update a shared file on IIS and ASP.NET? 如何配置“进程外会话提供程序”? (ASP.NET-IIS7) - How do I configure the Out Of Process Session Provider? (ASP.NET - IIS7) 如何使用ASP.NET在同一服务器上读取文本文件? - How do I read a text file on the same server with ASP.NET? 如何在不访问IIS日志文件的情况下监视ASP.NET MVC服务器的负载和性能 - How can I monitor ASP.NET MVC server load and performance without access to IIS log files 如何为 ASP.NET IIS Container 配置 IIS 设置? - How to configure IIS settings for ASP.NET IIS Container? 如何在IIS 7.5上使用ASP.NET表单身份验证保护静态文件? - How do I protect static files with ASP.NET form authentication on IIS 7.5? 允许使用IIS7从asp.net网页读取,写入和执行文件 - Allow read, write and execute files from asp.net web page using IIS7 如何使用ASP.NET在IIS 7服务器上保存XML文件 - How to save XML file on IIS 7 server using ASP.NET
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM