将文件保存到网络位置
我有一个应用程序必须将上传的文件保存到两个不同的服务器以实现负载平衡目的。第一个服务器 (serv01
) 与我正在构建的应用程序是同一台服务器,所以没问题。但是当代码使用以下路径执行到第二个服务器(serv02
)的上传过程时;
\\serv02\path\path\
我收到此异常“登录失败:未知的用户名或错误的密码。”。
我想我必须将 serv01
上的 asp.net 用户的权限添加到此网络位置,但是如何实现呢?如果我尝试添加权限,它总是会询问 serv02
的用户。有谁可以帮助我解决这个问题吗?
谢谢
I have an application that has to save an uploaded file to 2 different servers for load balancing purpose. The first server (serv01
) is the same server as the application that I'm building, so no problem. But when the code execute the upload process to the second server (serv02
) using the following path;
\\serv02\path\path\
I get this exception "Logon failure: unknown user name or bad password.".
I suppose I have to add permission to asp.net user on the serv01
to this network location, but how? If I tried to add permission, it always asks users from serv02
. Is there anyone who can help me with this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是在工作组还是域中运行?
如果是工作组,则在两台服务器上设置与您的 AppPool 帐户相同的帐户(匹配用户名和密码),以便工作组网络正常工作。
如果它是一个域,则只需将您的 AppPool 配置为使用有权写入每台服务器上的共享的域用户帐户即可。
Are you running in a workgroup or a domain?
If a workgroup then setup the same account that your using for your AppPool account on both servers (matching username & password) so that workgroup networking will work.
If it's a domain it should just be a case of configuring your AppPool to use a domain user account that has permissions to write to the share on each server.