繁体   English   中英

Windows Azure-NetworkInformationException(0x80004005):访问被拒绝-HttpWebRequest

[英]Windows Azure - NetworkInformationException (0x80004005): Access is denied - HttpWebRequest

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.get_FixedInfo()的System.Net.NetworkInformation.SystemIPGlobalProperties.GetFixedInfo()在System.Net.NetworkInformation.SystemIPGlobalProperties.get_HostName()被拒绝访问在System.Net.ServicePoint.SubmitRequest(HttpWebRequest请求,System.Net.ConnectionGroup..ctor(ServicePoint servicePoint,字符串connName)的System.Net.ServicePoint.get_ConnectionLimit()处的System.Net.NclUtilities.GuessWhetherHostIsLoopback(字符串主机) System.Net.HttpWebRequest.SubmitRequest上的字符串connName)(System.Net.HttpWebRequest.GetResponse()上的ServicePoint servicePoint)

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

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

尝试使用特定的凭据从asp.net启动该过程,即使用本地用户凭据。 天蓝色可能会阻止未经身份验证的进程访问互联网。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM