【问题标题】:Windows Azure - NetworkInformationException (0x80004005): Access is denied - HttpWebRequestWindows Azure - NetworkInformationException (0x80004005):访问被拒绝 - HttpWebRequest
【发布时间】:2013-03-13 08:08:52
【问题描述】:

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

【问题讨论】:

  • 发生这种情况时,您能否在代码中发布full 堆栈跟踪+相关行?

标签: asp.net azure permissions


【解决方案1】:

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

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

【讨论】:

    【解决方案2】:
    【解决方案3】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-04
      • 2016-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-29
      相关资源
      最近更新 更多