dior001
dior001

Reputation: 761

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

GetResponse works fine on my local machine but when deployed to Windows Azure I receive the following exception. My ASP.NET website runs an exe I created as a new process and it is the code in the exe that encounters the exception listed below. Can anyone suggest possible permission settings I can look at to solve this problem?

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

System.Net.NetworkInformation.NetworkInformationException (0x80004005): Access is denied at System.Net.NetworkInformation.SystemIPGlobalProperties.GetFixedInfo() at System.Net.NetworkInformation.SystemIPGlobalProperties.get_FixedInfo() at System.Net.NetworkInformation.SystemIPGlobalProperties.get_HostName() at System.Net.NclUtilities.GuessWhetherHostIsLoopback(String host) at System.Net.ServicePoint.get_ConnectionLimit() at System.Net.ConnectionGroup..ctor(ServicePoint servicePoint, String connName) at System.Net.ServicePoint.SubmitRequest(HttpWebRequest request, String connName) at System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint) at System.Net.HttpWebRequest.GetResponse()

Upvotes: 4

Views: 764

Answers (3)

bhavesh lad
bhavesh lad

Reputation: 1292

Try to launch the process from asp.net with specific credential.. i.e. using local user credential. It might be possible that azure is blocking unauthenticated process to access internet.

Upvotes: 2

Andrew
Andrew

Reputation: 1616

Need more information, but my first thought is that you are:

  • Trying to bind a socket to a privileged port (port <= 1024)
  • Trying to bind a socket to an IP you don't have on that machine
  • The user your local website runs that code has higher permissions of some kind than the user Windows Azure (eg the IIS AppPool?) runs it as

Upvotes: 2

Related Questions