0

我已将 Azure Storage Emulator 运行的端口从“C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe.配置”

现在,当我尝试从 Visual Studio 2013 中的服务器资源管理器访问开发存储时,它无法访问更新的端口。我尝试手动添加外部存储并指定端点以使用以下信息默认存储帐户信息反映更新的端口:

DefaultEndpointsProtocol=http

AccountName=devstoreaccount1

AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVERCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

BlobEndpoint= http://127.0.0.1:10003/devstoreaccount1

QueueEndpoint= http://127.0.0.1:10004/devstoreaccount1

TableEndpoint= http://127.0.0.1:10005/devstoreaccount1

但这仍然不允许它连接。我也尝试了相同的端点,但没有存储帐户后缀。当我刷新外部存储时,它甚至会将端口恢复为 10000,10001,10002。我假设它是从某处的某个配置中读取的,但我似乎无法通过谷歌搜索任何关于从何处读取它的答案。

那么如何配置服务器资源管理器以反映更新的端口?

4

2 回答 2

0

不幸的是,不支持更改 Azure 存储模拟器端口。

于 2015-03-30T04:53:10.997 回答
0

这些端口被硬编码到 CloudStorageAccount 类中,所以你不能修改它们:

 private static CloudStorageAccount GetDevelopmentStorageAccount(Uri proxyUri)
        {
            UriBuilder uriBuilder = proxyUri != (Uri)null ? new UriBuilder(proxyUri.Scheme, proxyUri.Host) : new UriBuilder("http", "127.0.0.1");
            uriBuilder.Path = "devstoreaccount1";
            uriBuilder.Port = 10000;
            Uri uri1 = uriBuilder.Uri;
            uriBuilder.Port = 10001;
            Uri uri2 = uriBuilder.Uri;
            uriBuilder.Port = 10002;
            Uri uri3 = uriBuilder.Uri;
            uriBuilder.Path = "devstoreaccount1-secondary";
            uriBuilder.Port = 10000;
            Uri uri4 = uriBuilder.Uri;
            uriBuilder.Port = 10001;
            Uri uri5 = uriBuilder.Uri;
            uriBuilder.Port = 10002;
            Uri uri6 = uriBuilder.Uri;
            CloudStorageAccount cloudStorageAccount = new CloudStorageAccount(new StorageCredentials("devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="), new StorageUri(uri1, uri4), new StorageUri(uri2, uri5), new StorageUri(uri3, uri6), (StorageUri)null);
            cloudStorageAccount.Settings = (IDictionary<string, string>)new Dictionary<string, string>();
            cloudStorageAccount.Settings.Add("UseDevelopmentStorage", "true");
            if (proxyUri != (Uri)null)
                cloudStorageAccount.Settings.Add("DevelopmentStorageProxyUri", proxyUri.ToString());
            cloudStorageAccount.IsDevStoreAccount = true;
            return cloudStorageAccount;
        }
于 2015-05-04T09:00:42.727 回答