Rasmus Christensen
Rasmus Christensen

Reputation: 8531

Change running IP of Azure Storage emulator

I'm using the "new" Azure storage emulator command-line edition. In the previous version it was possible to change IP like 127.0.0.1 -> 192.168.41.123 when running .

I can not locate the same file anymore and have looked into the other config files, but so far with no luck. Anyone knows how to change it?

Upvotes: 6

Views: 7030

Answers (3)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

You can change the IP address in AzureStorageEmulator.exe.config file in C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator directory.

For example, below I have changed the port from 10000 to 20000.

<services>
  <service name="Blob" url="http://127.0.0.1:20000/"/>
  <service name="Queue" url="http://127.0.0.1:20001/"/>
  <service name="Table" url="http://127.0.0.1:20002/"/>
</services>

You would need to restart the storage emulator for this change to take effect.

Also, please note that you can't use standard UseDevelopmentStorage=true connection string. You must specify custom endpoints in your connection string:

<appSettings>
  <add key="StorageConnectionString" value="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:20000/devstoreaccount1;TableEndpoint=http://127.0.0.1:20002/devstoreaccount1;QueueEndpoint=http://127.0.0.1:20001/devstoreaccount1;/>
</appSettings>

Upvotes: 11

samm
samm

Reputation: 712

It's recommended to use port forwarding because of the instability of Azure Emulator. However, it doesn't work when connectaddress is 127.0.0.1 using the built-in tool netsh on my windows 7 (see for detail: problem with adding a portproxy using netsh). I research and use PassPort port forwarding utility Win XP to help me with port forwarding.

enter image description here

Upvotes: 0

Alex Belotserkovskiy
Alex Belotserkovskiy

Reputation: 4062

For me, changing

c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe.config

Worked, then stop and start the emulator. Check if that is working for you.

Upvotes: 0

Related Questions