Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 失败,因为返回的路径不存在_.net_Azureservicebus_Nservicebus - Fatal编程技术网

.net 失败,因为返回的路径不存在

.net 失败,因为返回的路径不存在,.net,azureservicebus,nservicebus,.net,Azureservicebus,Nservicebus,由于返回的路径(D:\home\site\wwwroot\App\u数据)不存在,因此失败 无法确定诊断输出目录。有关更多信息,请检查附加的异常,或使用'EndpointConfiguration.SetDiagnosticsPath()'配置自定义诊断目录 当App\u Data文件夹不存在时,通常会发生此异常。尝试在项目中手动创建此文件夹。如果这没有帮助,或者您使用的是不同的基本目录,则可以使用endpointConfiguration.SetDiagnosticsPath配置不同的路径。官

由于返回的路径(D:\home\site\wwwroot\App\u数据)不存在,因此失败

无法确定诊断输出目录。有关更多信息,请检查附加的异常,或使用
'EndpointConfiguration.SetDiagnosticsPath()'
配置自定义诊断目录


App\u Data
文件夹不存在时,通常会发生此异常。尝试在项目中手动创建此文件夹。如果这没有帮助,或者您使用的是不同的基本目录,则可以使用
endpointConfiguration.SetDiagnosticsPath
配置不同的路径。官方文件中也对此进行了说明:


如果这不能解决问题,您需要提供有关配置和宿主环境的更多详细信息,在没有进一步上下文的情况下粘贴异常并没有多大帮助。

您在Windows上吗?您使用的是什么Web服务器?IIS或其他任何东西?托管环境是Azure PaaS。Azure PaaS WebApp是托管环境,因此我们无法手动创建,配置Azure WebApp路径到endpointConfiguration的最佳方法是什么。SetDiagnosticsPath。@JagadeeshB您可以通过转到WebApp中的应用程序服务编辑器(在开发工具下)手动创建文件夹(在Azure门户中),然后在wwwroot文件夹中创建App_数据文件夹。您还可以在项目中的App_数据文件夹中创建一个文件,该文件也应将App_数据文件夹部署到WebApp。或者在Visual Studio中右键单击App_数据文件夹并显式发布该文件夹。
System.Exception: Detected running in a website and attempted to use
HostingEnvironment.MapPath("~/App_Data/") to derive the logging path.
Failed since path returned (D:\home\site\wwwroot\App_Data\) does not
exist. Ensure this directory is created and restart the endpoint.   
at NServiceBus.Host.DeriveAppDataPath(Assembly systemWebAssembly)   
at NServiceBus.Host.GetOutputDirectory()    at
NServiceBus.HostStartupDiagnostics.BuildDefaultDiagnosticsWriter(ReadOnlySettings
settings)