Web Application 部署碰到的Transform.xml错误的问题

1. 先来看看错误的消息和提示:

Error 16 The "TransformXml" task failed unexpectedly. System.UriFormatException: Invalid URI: The URI is empty.    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)    at System.Uri..ctor(String uriString)    at Microsoft.Web.Publishing.Tasks.TransformXml.Execute()    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) 

 

碰到这样的问题一般都是webconfig里面有些字符不正确或者没有转义出现的问题。

 

错误的原因后来在webconfig中发现:

<target name="sqlTracing"  xsi:type="File" fileName="${basedir}/sqllog.txt"  layout="${longdate}:===========================> ${newline} ${message}"/>

 

修改成:

<target name="sqlTracing"  xsi:type="File" fileName="${basedir}/sqllog.txt"  layout="${longdate}:===========================&gt; ${newline} ${message}"/>

就可以了。

 

像"<", “>”, "(", ")" 等特殊字符在webconfig中需要转义。

转载于:https://www.cnblogs.com/zbphot/archive/2013/04/16/3024140.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值