Azure 存储模拟器 returns 500 内部服务器错误

Azure Storage Emulator returns 500 internal server error

我有一个使用 Azure 存储的应用程序,当我重新安装 Azure 存储模拟器和资源管理器然后 运行 该应用程序时,我收到此错误。 在我重新安装之前,该应用程序正在运行。

[WebException: The remote server returned an error: (500) Internal Server Error.]
Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException(HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:54
   Microsoft.WindowsAzure.Storage.Blob.<>c__DisplayClass57.<PutBlobImpl>b__56(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:3132
  Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse(IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:300

[StorageException: The remote server returned an error: (500) Internal Server Error.]
   Microsoft.WindowsAzure.Storage.Core.Util.StorageAsyncResult`1.End() in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\StorageAsyncResult.cs:77
   Microsoft.WindowsAzure.Storage.Core.Util.<>c__DisplayClass7.<CreateCallbackVoid>b__5(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:121
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   Microsoft.AspNetCore.DataProtection.AzureStorage.<StoreElementAsync>d__14.MoveNext() +1308
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   Microsoft.AspNetCore.DataProtection.AzureStorage.AzureBlobXmlRepository.StoreElement(XElement element, String friendlyName) +161
   Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.CreateNewKey(Guid keyId, DateTimeOffset creationDate, DateTimeOffset activationDate, DateTimeOffset expirationDate) +1493
   Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CreateNewKey(DateTimeOffset activationDate, DateTimeOffset expirationDate) +150
   Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded) +645
   Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now) +12
   Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow) +517
   Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) +90

[WebException: The remote server returned an error: (500) Internal Server Error.]

解决上述问题的解决方法之一:

  • 尝试用其他名称重命名应用程序名称并重新启动 azure 存储模拟器(>运行 AzureStorageEmulator.exe start) 和 运行 应用程序。

或者使用 Azure 存储资源管理器 解决,请按照@Seth 的建议找到这个 .

有关更多信息,您可以参考此 .