2011-04-22 85 views
8

Nlog现在抛出一个异常,现在我已经从1.0 - > 2.0更新了。NLogConfigurationException - 从'System.String'无效强制转换为'System.Uri'

当NLog.Config.XmlLoggingConfiguration.Initialize被称为以下发生异常:
“设置时的错误属性上的WebService 'URL' 目标[Target_AuditLog_WebService_Global]”
用的的InnerException:
“无效从 '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

+0

是的,它发生在你试图投射一个相对链接的字符串 – CarneyCode 2011-04-24 13:34:34

回答

0

这是一个错误,并已修复,但与修订版本尚未正式发布,或通过的NuGet,如果您在这个运行问题你将需要使用每晚构建版本:
http://nlog.codeplex.com/releases/view/64708(我已确认作品)

如果在2011年4月27日之后有正式版本发布,应该尝试使用它。
http://nlog.codeplex.com/releases

相关问题