指向 UNC 共享的虚拟目录
我有一个通过标准将文档上传到服务器的应用程序
当将我的应用程序发送到生产服务器时,我发现他们的服务器负载平衡。 我的解决方案是将上传目录放入网络共享中,然后创建一个指向该共享的虚拟目录。
我已对共享和文件本身设置了权限,但每当我尝试上传文档时,我总是收到“访问被拒绝”的消息。
我哪里可能缺少权限? IUSR 是否需要访问该共享?
谢谢。
I have an app that uploads documents to the server through the standard
When sent my application to the production server, I found out that they had the server load balanced. My solution to this was to place the upload directory into a network share and then create a virtual directory pointing to the share.
I have set permissions on the share and the file itself, but I keep getting "access denied" whenever I try to upload a document.
Where could I be missing permissions? Is it possible that IUSR needs to have access to the share?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
仅供参考,
对我来说,此解决方案的答案是使用有权访问共享、文件夹和虚拟目录的用户帐户设置临时模拟。
以下是对我有用的代码的链接:
http://support.microsoft.com/kb /306158#4
FYI,
The answer to this solution for me was to setup temporary impersonation with a user account that had access to the share, the folder and the virtual directory.
Here's a link to the code that worked for me:
http://support.microsoft.com/kb/306158#4
我希望您的网站使用匿名访问。 否则你将会有一段痛苦的经历。
如果是这样(匿名访问),则: IUSR 是生产服务器上的本地用户,而不是域用户。 所以它无权访问共享。 您必须将其更改为域用户(在站点配置中而不是在应用程序池中)。 并确保应用程序池在网络服务上运行(这是默认设置)并且它应该可以工作。
I hope your site use anonymous access. Otherwise you will have a painful experience.
If it is so ( anonymous acess), then: The IUSR is a local user on the production servers and not a domain user. So it don't have access the the share. You will have to change that to a domain user ( in the site configuration and not on the application pool). And make sure that the application pool run on a network service ( this is the default ) and it should work.
很可能无论您的 ASP.Net 进程正在运行,都无权访问共享。
因此,您可能需要设置 IIS6 应用程序池以域用户身份运行,并让该域用户拥有文件共享的访问权限。
不要忘记 aspnet_regiis -ga {domainuser} 以便域用户可以实际运行 asp.net 应用程序。
Chances are that whatever your ASP.Net process is running as does not have access to the share.
So chances are you need to set up an IIS6 application pool to run as a domain user and have that domain user have access rights to the file share.
Don't forget to aspnet_regiis -ga {domainuser} so that the domain user can actually run asp.net applications.