简体   繁体   English

Azure:{“目录路径的语法无效” \\ r \\ n参数名称:initialConfiguration”}错误

[英]Azure: {“Invalid syntax for directory path ''\r\nParameter name: initialConfiguration”} Error

I am trying to to add my log file to blob storage. 我试图将我的日志文件添加到Blob存储中。 When tried to get the ConnectionString in Global.asax.cs I am getting this error from oriented here : 当试图在Global.asax.cs中获取ConnectionString时,我从这里获取此错误:

DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnostics);

How can I fix that problem. 我该如何解决该问题。 "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" is in ServiceConfiguration.Cloud.cscfg and ServiceConfiguration.Local.cscfg “ Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString”位于ServiceConfiguration.Cloud.cscfg和ServiceConfiguration.Local.cscfg中

To give more explanation : 给更多的解释:

System.ArgumentOutOfRangeException was unhandled
  HResult=-2146233086
  Message=Invalid syntax for directory path ''
Parameter name: initialConfiguration
  Source=Microsoft.WindowsAzure.Diagnostics
  ParamName=initialConfiguration
  StackTrace:
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorConfiguration.Validate(String paramName, Nullable`1 resourceSize)
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.StartWithExplicitConfiguration(DiagnosticMonitorStartupInfo startupInfo, DiagnosticMonitorConfiguration initialConfiguration)
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.Start(CloudStorageAccount storageAccount, DiagnosticMonitorConfiguration initialConfiguration)
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.Start(String diagnosticsStorageAccountConfigurationSettingName, DiagnosticMonitorConfiguration initialConfiguration)
       at Project.Web.WebRole.OnStart() in Global.asax.cs:line 104
       at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
       at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRole(RoleType roleType)
       at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

It looks like you are retrieving the connection string correctly, but your diagnostics configuration is invalid. 看起来您正在正确检索连接字符串,但是您的诊断配置无效。 What are you setting for Directory configurations? 您为目录配置设置了什么?

Instead of setting diagnostics configuration via code I would recommend using the wadcfg file ( http://msdn.microsoft.com/en-us/library/windowsazure/hh411551.aspx ), or use Visual Studio (see http://weblogs.asp.net/scottgu/archive/2013/04/30/announcing-the-release-of-windows-azure-sdk-2-0-for-net.aspx , in particular the "Cloud Services: Improved Diagnostics Support" section). 我建议不要使用wadcfg文件( http://msdn.microsoft.com/en-us/library/windowsazure/hh411551.aspx ),也可以使用Visual Studio(请参阅http:// weblogs ),而不是通过代码设置诊断配置。 asp.net/scottgu/archive/2013/04/30/anonuncing-the-release-of-windows-azure-sdk-2-0-for-net.aspx ,尤其是“云服务:改进的诊断支持”部分)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取 Azure Servicebus 队列错误“参数 namespaceConnectionString 为空或空白。\\r\\n参数名称:namespaceConnectionString” - Getting Azure Servicebus Queue Error "The argument namespaceConnectionString is null or white space. \r\nParameter name: namespaceConnectionString" 参数绑定无效\r\n参数名称: System.DateTime 上传数据到 oracle 表时 - Invalid parameter binding\r\nParameter name: System.DateTime while uploading data to oracle table 值不能为空,参数名称来源 - Value cannot be null, r nparameter name source ResourceDictionary中的运行时错误:{“Key不能为null。\\ r \\ nParameter name:key”} - Runtime Error in ResourceDictionary: {“Key cannot be null.\r\nParameter name: key”} 根据xml错误{“值不能为空。\\ r \\ n参数名称:元素”}创建对象 - Creating objects from xml error {“Value cannot be null.\r\nParameter name: element”} ASP.NET Core 2.2中面临的问题“提供的URI方案&#39;https&#39;无效; 预期的“ http”。\\ r \\ n参数名称:通过” - facing issue in ASP.NET Core 2.2 “The provided URI scheme 'https' is invalid; expected 'http'.\r\nParameter name: via” 值不能为null或为空。\ r \ nParameter name:name - Value cannot be null or empty.\r\nParameter name: name 值不能为空。\\ r \\ n参数名称:输入 - Value cannot be null.\r\nParameter name: input “值不能为空。\\r\\n参数名称:文本” - “Value cannot be null.\r\nParameter name: text” {“值不能为空。\\ r \\ nParameter name:s”} - {“Value cannot be null.\r\nParameter name: s”}
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM