开发者

Azure AccountName and AccountSharedKey problem

开发者 https://www.devze.com 2022-12-15 02:00 出处:网络
I\'m obviously not smart enough to figure it out on my own.Even after reading the very similar question, I\'m still far from solving this problem.I\'m sure that once again stackoverflow community will

I'm obviously not smart enough to figure it out on my own. Even after reading the very similar question, I'm still far from solving this problem. I'm sure that once again stackoverflow community will save me.

I'm trying to update ServiceConfiguration.cscfg file and I'm having problem to get the right account name. It's also possible that I'm using the wrong AcountSharedKey.

<ConfigurationSettings>
   <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=<ACCOUNT_NAME>;AccountKey=<ACCOUNT_KEY>"/>
</ConfigurationSettings>

Let assume that I have the following endpoint: http://mystorage.blob.core.windows.net

And my primary access key: "some_very_long_key"

I tried to put these values in DiagnosticsConnectionString section. Somethihg like this:

<ConfigurationSettings>
   <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=http://mystorage.blob.core.windows.net;AccountKey=some_very_long_key"/>
</ConfigurationSettings>

I'm oviously doing something wrong and I'm sure that you know what it is.

While waiting for someone to help me I also try this without开发者_开发问答 any success:

<ConfigurationSettings>
   <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=some_very_long_key"/>
</ConfigurationSettings>

UPDATE: When I try to publish, I see a message box with the following error:

There was a problem sending the command to the program.


I have deployed some sample Azure application successfully. You should not touch the DiagnosticsConnectionString property. You need to define one more connection property, e.g. "DataConnectionString" and provide the account details and use that in application. Based on your details, the sample configuration would be as below:

    <ConfigurationSettings>
  <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" />
  <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=some_very_long_key" />
</ConfigurationSettings>
0

精彩评论

暂无评论...
验证码 换一张
取 消