Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
519 views
in Technique[技术] by (71.8m points)

emulation - Azure Emulator Port conflict, app tries to connect to wrong port

When starting the Azure Storage Emulator, it fails because of a port conflict with some dell drivers/software.

I solved this by changing urls in the StorageEmulatorConfig section inside WAStorageEmulator.exe.config.

<StorageEmulatorConfig>
    <services>
      <service name="Blob" url="http://127.0.0.1:10100/"/>
      <service name="Queue" url="http://127.0.0.1:10101/"/>
      <service name="Table" url="http://127.0.0.1:10102/"/>
    </services>

    <accounts.../>
  </StorageEmulatorConfig>

So now the emulator runs without problem.

My web application still tries to connect to the old ports, though....

The connection string that I use is the short one:

<add name="AzureStorage" connectionString="UseDevelopmentStorage=true;"/>

I have tried the normal form too:

<add name="AzureStorage" 
     connectionString="DefaultEndpointsProtocol=https;
                       AccountName=devstoreaccount1;
                       AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;"/>

How does my app discover what endpoints it should use?
How can I tell it to use another port?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can try by specifying endpoints in your connection string:

DefaultEndpointsProtocol=http;
AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;
BlobEndpoint=http://127.0.0.1:10100/devstoreaccount1;
QueueEndpoint=http://127.0.0.1:10101/devstoreaccount1;
TableEndpoint=http://127.0.0.1:10102/devstoreaccount1;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...