簡體   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