Azure SDK 1.7存储模拟器-队列存储赢得';t启动-使用带有dev env自定义端口的存储客户端

Azure SDK 1.7存储模拟器-队列存储赢得';t启动-使用带有dev env自定义端口的存储客户端,azure,azure-storage,Azure,Azure Storage,问题:Azure Storage Emulator可以启动Blob和表存储,但队列存储将无法启动,显示错误对话框: “文件正被另一个进程使用” 找到了该问题的解决方案,但现在我的开发环境存储客户端出现了问题。这是我所做的 端口10001是队列存储的默认端口,因此根据我写的一些相关文章(输出中的最后一列是进程的PID): 这里最大的问题是10001上收听的是McAfee,我无法改变这一点 下一步是将队列存储重新配置为不使用10001: 重新配置存储仿真器以侦听可用端口。开放式: %PROGRAMF

问题:Azure Storage Emulator可以启动Blob和表存储,但队列存储将无法启动,显示错误对话框: “文件正被另一个进程使用” 找到了该问题的解决方案,但现在我的开发环境存储客户端出现了问题。这是我所做的

端口10001是队列存储的默认端口,因此根据我写的一些相关文章(输出中的最后一列是进程的PID):

这里最大的问题是10001上收听的是McAfee,我无法改变这一点

下一步是将队列存储重新配置为不使用10001: 重新配置存储仿真器以侦听可用端口。开放式:

%PROGRAMFILES%\Microsoft SDKs\Windows Azure\Emulator\devstore\DSServiceLDB.exe.config
在您喜爱的文本编辑器中,更改队列存储的绑定。。。就我而言,10003是可用的:

<?xml version="1.0"?>
<configuration>
  <configSections>    
    <section name="developmentStorageConfig" type="Microsoft.ServiceHosting.DevelopmentStorage.Utilities.DevelopmentStorageConfigurationHandler, DevelopmentStorage.Common"/>
  </configSections>

  <developmentStorageConfig>
    <services>
      <service name="Blob" url="http://127.0.0.1:10000/"/>
      <service name="Queue" url="http://127.0.0.1:10003/"/> <!-- this line here -->
      <service name="Table" url="http://127.0.0.1:10002/"/>
    </services>
...
现在,尝试在VS2012中配置我的客户端不起作用。。。 我已修改了配置文件:ServiceConfiguration.Cloud.cscfg 使用以下设置:

<Setting name="StorageConnectionString" value="BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10003/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount;AccountName=devstoreaccount;AccountKey=key copied from storage config file" />
所以经过一段时间的调整。。。 我查看了在使用开发设置时存储客户机正在执行的操作,并使用System.Diagnostics.Debugger.IsAttached块复制了代码。我还注意到我对队列的命名不正确(一旦我让客户端连接,它就会返回400错误):

查看此目录(C:\Program Files\Microsoft SDK\Windows Azure\Emulator\devstore)并更改DSServiceDB.exe.config中的端口配置:

<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10003/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>


我对10001也有同样的问题。

您正在运行哪个版本的SDK?您是否将新的1.8版本与新的存储客户端库2.0一起使用?使用新的sdk,您可以使用vs2012工具直接操作队列存储。这在1.7程序集上。我今天刚拿到1.8SDK,但项目是在那之前创建的,我没有更改程序集引用。我还没上2.0。我现在已经阅读了所有3个SDK,但由于这是为了生产,我不得不使用稳定版本。
<Setting name="StorageConnectionString" value="BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10003/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount;AccountName=devstoreaccount;AccountKey=key copied from storage config file" />
    storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
    queueClient = storageAccount.CreateCloudQueueClient();
    queue = queueClient.GetQueueReference("testqueue");
    queue.CreateIfNotExist();
if (System.Diagnostics.Debugger.IsAttached)
        {
            var blobEndpoint = new Uri("http://127.0.0.1:10000/devstoreaccount1");
            var queueEndpoint = new Uri("http://127.0.0.1:10003/devstoreaccount1");
            var tableEndpoint = new Uri("http://127.0.0.01:10002/devstoreaccount1");
            var storageCreds = new StorageCredentialsAccountAndKey("devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");

            _storageAccount = new CloudStorageAccount(storageCreds, blobEndpoint, queueEndpoint, tableEndpoint);
        }
        else
        {
            _storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
        }
        _queueClient = _storageAccount.CreateCloudQueueClient();
        /* Queue naming rules:
         *  1. A queue name must start with a letter or number, and can only contain letters, numbers, and the dash (-) character. 
            2. The first and last letters in the queue name must be alphanumeric. The dash (-) character cannot be the first or last character. Consecutive dash characters are not permitted in the queue name.
            3. All letters in a queue name must be lowercase.
            4. A queue name must be from 3 through 63 characters long.
         */
        _queue = _queueClient.GetQueueReference("myqueuename");
        _queue.CreateIfNotExist();  
<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10003/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>