views:

28

answers:

0

I'm developing an ASP.net application on my local IIS, where it works fine. I've set up a Windows 2008 Web Server R2 as a virtual machine in my network, installed the .net framework, all IIS features (server version do match) etc. My apps run fine except for this issue:

I have several Settings that are created by the Settings Property of the project.

  <setting name="UserRootDocumentfolder" serializeAs="String">
    <value>~/userfolder/</value>
  </setting>

On my local IIS everything work fine. I'm deploying my web app using WebDeploy and the new web.config Transforms to replace settings. On my target IIS the seriliazed settings look like

  <setting name="UserRootDocumentfolder" serializeAs="String">
    <value>~/userfolder/
    </value>
  </setting>

and now contain a LineBreak that throws exceptions in my application. (Like Response.Redirect can't contain URLs with a line break.

How can I fix this issue without manually editing the web.config on the server? (Or using a backupfile)?