asp.net – NLogConfigurationException – 从’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

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....