I got this error after I used powershell script to change debug="false" to debug="true" for all web.config.
I found nothing wrong by comparing the deployed web.config and the web.config in the source tree.
It turned out an encoding issue after I re-saved the web.config using UTF-8 in notepad.
I modified the string replacing script to control the encoding.
$pattern ='debug="false"'
$replacement ='debug="true"'
$encode="default" # can be utf8 unicode default (it is actually ANSI)
$targetFile="web.config"
foreach ($file in (gci . -name $targetFile -rec)) {
if($file -match "PortalUI")
{
continue;
}
write-host process $file ...
write-host resave file using $encode
$text = get-content $file
$text | out-file $file -encoding $encode
$text = get-content $file
if ($text -match $pattern) {
write-host modifying $file
$text -replace $pattern, $replacement | out-file $file -encoding $encode
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment