« Previous Next »

Thread: IIS 7 incorrectly strips values from web.config when adding a Script Map

Last post 11-07-2007 5:33 PM by mailant. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 11-29-2006, 10:20 PM

    IIS 7 incorrectly strips values from web.config when adding a Script Map

    I've noticed that when you add a script map in IIS 7, IIS will alter your web.config and actually remove values it has nothing to do with.

    For example,   

    <applicationSettings>
        <Dealers.Web.Properties.Settings>
          <setting name="Dealers_Web_UserAgentsService_UserAgentsService"
            serializeAs="String">
            <value>http://useragents.vertagen.com/UserAgentsService.asmx</value>
          </setting>
        </Dealers.Web.Properties.Settings>
    </applicationSettings>

    Is changed to

    <applicationSettings>
        <Dealers.Web.Properties.Settings>
          <setting name="Dealers_Web_UserAgentsService_UserAgentsService" serializeAs="String">
            <value></value>
          </setting>
        </Dealers.Web.Properties.Settings>
    </applicationSettings>

    It appears that if IIS sees any value in your web.config that is stored in a <tag>value</tag> format, it will strip the value out.

     
    I think its easy to see that this is a serious problem, does anyone know if there's a work-around or patch available?
     

  • 11-29-2006, 10:54 PM In reply to

    • bills
    • Top 25 Contributor
    • Joined on 02-03-2006, 5:33 PM
    • Redmond, WA
    • Posts 433

    Re: IIS 7 incorrectly strips values from web.config when adding a Script Map

    I haven't seen this before.  Are you using the UI to 'add a script map' or some other programmatic API?

    bill
    ~~~~~~~~~~~~~~~~~~~~~~~~
    Bill Staples
    Product Unit Manager, IIS
    blog: http://blogs.iis.net/bills
  • 11-30-2006, 12:18 PM In reply to

    Re: IIS 7 incorrectly strips values from web.config when adding a Script Map

    I'm using the managment console that ships with Vista, no third party APIs or tools.

    Thanks!

  • 11-30-2006, 8:09 PM In reply to

    • bills
    • Top 25 Contributor
    • Joined on 02-03-2006, 5:33 PM
    • Redmond, WA
    • Posts 433

    Re: IIS 7 incorrectly strips values from web.config when adding a Script Map

    ouch - thanks for the report.  I have confirmed this is a bug.  We are working on a fix now. 

    Bill

    ~~~~~~~~~~~~~~~~~~~~~~~~
    Bill Staples
    Product Unit Manager, IIS
    blog: http://blogs.iis.net/bills
  • 12-01-2006, 3:54 PM In reply to

    Re: IIS 7 incorrectly strips values from web.config when adding a Script Map

    Thanks!!
  • 11-07-2007, 5:33 PM In reply to

    • mailant
    • Top 150 Contributor
    • Joined on 09-21-2004, 2:58 PM
    • Posts 49

    Re: IIS 7 incorrectly strips values from web.config when adding a Script Map

    Here's the fix for this behavior: http://support.microsoft.com/kb/930451

    Mai-lan Tomsen Bukovec
    Product Unit Manager
    IIS
Page 1 of 1 (6 items)
Microsoft Communities