将文件保存到网络位置

发布于 2024-12-10 06:33:28 字数 364 浏览 3 评论 0原文

我有一个应用程序必须将上传的文件保存到两个不同的服务器以实现负载平衡目的。第一个服务器 (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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我ぃ本無心為│何有愛 2024-12-17 06:33:28

您是在工作组还是域中运行?

如果是工作组,则在两台服务器上设置与您的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文