C# Microsoft.WindowsAzure.Storage:服务器遇到内部错误,但没有说明根本原因
在本地,我用azurite创建了一个Blob存储容器,我可以用Storarge Explorer写入/删除文件 此代码开始时很好,但在视图秒后结束,出现未处理的异常C# Microsoft.WindowsAzure.Storage:服务器遇到内部错误,但没有说明根本原因,c#,.net-core,azure-functions,azure-storage,azurite,C#,.net Core,Azure Functions,Azure Storage,Azurite,在本地,我用azurite创建了一个Blob存储容器,我可以用Storarge Explorer写入/删除文件 此代码开始时很好,但在视图秒后结束,出现未处理的异常 using System.IO; using Microsoft.Azure.WebJobs; using Microsoft.Extensions.Logging; namespace WatchStorage { #region Constructor public class WatchStorageFun
using System.IO;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
namespace WatchStorage
{
#region Constructor
public class WatchStorageFunctions
{
private ILogger Logger { get; set; }
public WatchStorageFunctions(ILogger<WatchStorageFunctions> logger)
{
this.Logger = logger;
}
#endregion
[FunctionName("TaskWatchWebjobs")]
public void RunTaskWatchWebjobs([BlobTrigger("azuritstore/{name}", Connection = "AzureWebJobsStorage")]Stream myBlob, string name)
{
this.Logger.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}
}
}
错误消息只是
[] Host lock lease acquired by instance ID '00000000000000000000000049821116'.
[] An unhandled exception has occurred. Host is shutting down.
[] Microsoft.WindowsAzure.Storage: Server encountered an internal error. Please try again after some time.
[] Stopping host...
[] Stopping JobHost
[] Job host stopped
[] Host shutdown completed.
我是新的东西,希望有一个更详细的错误消息。可能吗?
如有任何进一步的提示,我们将不胜感激 是的,您可以在本地调试中看到详细的错误消息。我已经在我的终端创建了一个Azure Blob触发器,并将向您展示如何查看详细错误。请检查以下内容:
感谢您的详细回答,不幸的是“发生了一个错误,说明不了多少”对吗?编辑了这个问题,并有错误输出您是否有一个名为“azuritstore”的容器?您可以通过以下方式安装Azurite吗?并通过运行以下cli命令来检查它:azurite--silent--location c:\azurite--debug c:\azurite\debug.log?谢谢,看起来很有希望。不幸的是,现在VisualStudio抱怨它无法启动存储模拟器。它不应该这样做,因为我在VS代码中有azurite,或者其他地方有你的命令。任何关于如何启动azure storage emulator的提示?这是Visual Studio代码插件的问题。禁用它并运行您的命令就成功了!
[] Host lock lease acquired by instance ID '00000000000000000000000049821116'.
[] An unhandled exception has occurred. Host is shutting down.
[] Microsoft.WindowsAzure.Storage: Server encountered an internal error. Please try again after some time.
[] Stopping host...
[] Stopping JobHost
[] Job host stopped
[] Host shutdown completed.