4

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.NclUtilities.GuessWhetherHostIsLoopback(String host) 在 System.Net.ServicePoint.get_ConnectionLimit() 在 System.Net.ConnectionGroup..ctor(ServicePoint servicePoint, String connName) 在 System.Net.ServicePoint.SubmitRequest(HttpWebRequest 请求,字符串 connName) 在 System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint) 在 System.Net.HttpWebRequest.GetResponse()

4

3 回答 3

2

需要更多信息,但我的第一个想法是您是:

  • 尝试将套接字绑定到特权端口(端口 <= 1024)
  • 尝试将套接字绑定到您在该机器上没有的 IP
  • 您的本地网站运行该代码的用户比 Windows Azure 用户(例如 IIS AppPool?)运行它的权限更高
于 2013-03-30T11:37:41.590 回答
2

尝试使用特定凭据从 asp.net 启动进程。即使用本地用户凭据。azure 可能会阻止未经身份验证的进程访问 Internet。

于 2013-04-05T03:31:37.710 回答
2

DirectoryService COM 无法创建身份验证对象。查看 http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx

于 2013-04-02T20:37:55.170 回答