部署IIS后,将拒绝访问远程计算机中的路径 [英] Access to the path in remote computer is denied after deployment IIS

查看:312
本文介绍了部署IIS后,将拒绝访问远程计算机中的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net webapplication,可以将文件从远程计算机复制到本地计算机。在VS中一切正常,但是当我将应用程序部署到Web服务器时,我开始收到错误访问路径'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\被拒绝。



我尝试过的事情:



我'尝试过:

WebRequest wr = WebRequest.Create(url);

wr.Credentials = CredentialCache.DefaultCredentials;

WebResponse response = wr。 GetResponse();

在这里我再次发生错误:

访问路径

I have an asp.net webapplication that copies files from remote computer to local computer. In VS everything works fine, but when I deploy the application to the Webserver, I begin getting the error "Access to the path '\\192.161.18.7\Doc$\2\tmp\MV1_DWG1.CGM' is denied."

What I have tried:

I've tried:
WebRequest wr = WebRequest.Create(url);
wr.Credentials = CredentialCache.DefaultCredentials;
WebResponse response = wr.GetResponse();
and here I revceive error:
access to the path denided

推荐答案

\ 2 \tmp \ MV1_DWG1.CGM'被拒绝。



我尝试过:



我试过了:

WebRequest wr = WebRequest.Create(url);

wr.Credentials = CredentialCache.DefaultCredentials;

WebResponse response = wr.GetResponse();

这里我发现错误:

访问路径den ided
\2\tmp\MV1_DWG1.CGM' is denied."

What I have tried:

I've tried:
WebRequest wr = WebRequest.Create(url);
wr.Credentials = CredentialCache.DefaultCredentials;
WebResponse response = wr.GetResponse();
and here I revceive error:
access to the path denided


这是一个权限问题。运行代码的帐户没有权限。这是一个容易解决的问题。在IIS中查找正在运行应用程序池的帐户并为其授予权限或将帐户更改为具有权限的帐户。
That is a permissions issue. The account that is running your code does not have permissions. That's an easy problem to fix. Find the account that is running the Application Pool in IIS and give it permissions or change the account to one that does have permissions.


这篇关于部署IIS后,将拒绝访问远程计算机中的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆