加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – NLogConfigurationException – 从’System.String’

发布时间:2020-12-16 04:23:35 所属栏目:asp.Net 来源:网络整理
导读:现在我已经从1.0更新了一个例外 – 2.0. 调用NLog.Config.XmlLoggingConfiguration.Initialize时,会发生以下异常: “在WebService目标[Target_AuditLog_WebService_Global]上设置属性’Url’时出错” 内部异常:“从’System.String’到’System.Uri’的无
现在我已经从1.0更新了一个例外 – >> 2.0.

调用NLog.Config.XmlLoggingConfiguration.Initialize时,会发生以下异常:

“在WebService目标[Target_AuditLog_WebService_Global]上设置属性’Url’时出错”
内部异常:“从’System.String’到’System.Uri’的无效转换.

目标看起来像这样:

<target name="Target_AuditLog_WebService_Global" xsi:type="WebService" namespace="http://ourLoggingServer.corp/" protocol="Soap12" methodName="AddLog" url="http://ourLoggingServer.corp/Logger.asmx">
  <parameter /> <!-- Several params,none of type system.uri -->
</target>

我发现这似乎他们认为它固定:
http://nlog.codeplex.com/workitem/5352

解决方法

这是一个错误并已修复,但是,修复版本尚未正式发布或通过NuGet发布,如果您遇到此问题,则需要使用每晚构建版本:http://nlog.codeplex. com / releases / view / 64708(我已确认有效)如果在2011年4月27日之后有正式版本,你应该尝试使用它. http://nlog.codeplex.com/releases

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读