加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – Windows Azure – NetworkInformationException(0x80

发布时间:2020-12-16 06:48:49 所属栏目:asp.Net 来源:网络整理
导读:GetResponse在我的本地计算机上运行正常但是当部署到 Windows Azure时,我收到以下异常.我的ASP.NET网站运行我作为新进程创建的exe,它是exe中遇到下面列出的异常的代码.任何人都可以建议我可以看看可能的权限设置来解决这个问题吗? HttpWebRequest request =
GetResponse在我的本地计算机上运行正常但是当部署到 Windows Azure时,我收到以下异常.我的ASP.NET网站运行我作为新进程创建的exe,它是exe中遇到下面列出的异常的代码.任何人都可以建议我可以看看可能的权限设置来解决这个问题吗?

HttpWebRequest request = WebRequest.Create(requestUrl) as HttpWebRequest;
request.UserAgent = _userAgent;
request.Timeout = 50000;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;

System.Net.NetworkInformation.NetworkInformationException(0x80004005):访问被拒绝
在System.Net.NetworkInformation.SystemIPGlobalProperties.GetFixedInfo()
在System.Net.NetworkInformation.SystemIPGlobalProperties.get_FixedInfo()
在System.Net.NetworkInformation.SystemIPGlobalProperties.get_HostName()
at System.Net.NclUtilities.GuessWhetherHostIsLoopback(String host)
在System.Net.ServicePoint.get_ConnectionLimit()
在System.Net.ConnectionGroup..ctor(ServicePoint servicePoint,String connName)
在System.Net.ServicePoint.SubmitRequest(HttpWebRequest请求,String connName)
在System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint)
在System.Net.HttpWebRequest.GetResponse()

解决方法

需要更多信息,但我首先想到的是:

>尝试将套接字绑定到特权端口(端口< = 1024)>尝试将套接字绑定到该计算机上没有的IP>您的本地网站运行的用户该代码具有比用户Windows Azure更高的权限(例如IIS AppPool?)将其运行为

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读