我对 Azure App Services 完全陌生,但我已经设法使用 .NET 后端构建了第一个测试应用程序(使用免费的测试服务计划)。现在这工作正常,我决定升级并选择基本服务计划。在 Azure 门户中这样做之后,我尝试通过我的客户端应用程序和 Postman 检索数据,但我得到的只是“500 内部服务器错误”和空洞的错误消息“发生错误”。不过,奇怪的是,如果我在本地开始调试,一切正常,我可以访问所有资源。
编辑正如 evilSnobu 建议的那样,我打开了失败的请求跟踪,我收到了以下错误:
System.ApplicationException: The trace listener AzureBlobTraceListener is disabled. ---> System.InvalidOperationException: The SAS URL for the cloud storage account is not specified. Use the environment variable 'DIAGNOSTICS_AZUREBLOBCONTAINERSASURL' to define it.
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.RefreshConfig()
按照此问题的答案中所述在诊断日志中设置存储帐户后,我收到以下错误:
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.PutBlockList(IEnumerable`1 blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.AppendStreamToBlob(Stream stream)
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.ConsumeBuffer()
Request Information
StatusMessage:The specified block list is invalid.
ErrorCode:InvalidBlockList
有人对此有解决方案吗?