Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Azure storage account thru proxy server

My 'LocalClient' app is in a corporate LAN behind an HTTP proxy server (ISA). The first Azure API call i make - CloudQueue.CreateIfNotExist() - causes an exception: (407) Proxy Authentication Required. I tried following things:

  • Added the <System.Net> defaultProxy element to app.config, but it doesn't seem to be working (Reference: http://geekswithblogs.net/mnf/archive/2006/03/08/71663.aspx).
  • I configured 'Microsoft Firewall Client for ISA Server', but that did not help either.
  • Used a custom proxy handler as suggested here: http://dunnry.com/blog/2010/01/25/SupportingBasicAuthProxies.aspx. I am not able to get this working - getting a Configuration initialization exception.

As per MSDN, an HTTP proxy server can be specified in the connection string only in case of Development Storage (see http://msdn.microsoft.com/en-us/library/ee758697.aspx):
UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri

Is there any way to connect to the Azure Storage thru a proxy server?

like image 455
amolbk Avatar asked Oct 22 '10 04:10

amolbk


People also ask

How do I connect to Azure storage?

Open your storage account page and select Settings > Access keys. In the Select Resource panel of the Connect to Azure Storage dialog, select Storage account. Select Account name and key and select Next. Enter a display name for your connection, the name of the account, and one of the account keys.

How do I access Azure Blob storage via URL?

You can anonymously read blob storage content directly using a browser if public access to blobs is enabled. The URL to your blob content takes this format: https://<your account name>. blob.core.windows.net/<your container name>/<your path and filename>


1 Answers

I actually found that the custom proxy solution was not required.

Adding the following to app.config (just before the </configuration>) did the trick for me:

<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy usesystemdefault="true" />
</defaultProxy>
</system.net>
like image 97
Nick Evans Avatar answered Sep 24 '22 22:09

Nick Evans