How do I overwrite existing web.config with a new one?

Discussion in 'ASP .Net' started by Andy, Jun 12, 2007.

  1. Andy

    Andy Guest

    I thought I could RDP to the web server, open the web.config, make the
    change, and save it.

    But this causes IIS to hang, and it never recovers - I have to create
    a new website in IIS!

    Should I be copying the existing web.config, changing it, and then
    copying the new version over the old version?

    Any help appreciated, it is driving me nuts!
     
    Andy, Jun 12, 2007
    #1
    1. Advertising

  2. If you change web.config, IIS should recognise a change has occurred and
    restart, loading the new values. I always issue an iisreset after I change
    web.config - perhasp that will help you solve your issue.

    Regards

    John Timney (MVP)
    http://www.johntimney.com
    http://www.johntimney.com/blog



    "Andy" <> wrote in message
    news:...
    >I thought I could RDP to the web server, open the web.config, make the
    > change, and save it.
    >
    > But this causes IIS to hang, and it never recovers - I have to create
    > a new website in IIS!
    >
    > Should I be copying the existing web.config, changing it, and then
    > copying the new version over the old version?
    >
    > Any help appreciated, it is driving me nuts!
    >
     
    John Timney \(MVP\), Jun 12, 2007
    #2
    1. Advertising

  3. Andy

    Andy Guest

    On 12 Jun, 09:33, "John Timney \(MVP\)" <>
    wrote:
    > If you change web.config, IIS should recognise a change has occurred and
    > restart, loading the new values. I always issue an iisreset after I change
    > web.config - perhasp that will help you solve your issue.
    >
    > Regards
    >
    > John Timney (MVP)http://www.johntimney.comhttp://www.johntimney.com/blog
    >

    How does an IIS Reset compare with a full restart of IIS? Does it do
    anything differently?

    > "Andy" <> wrote in message
    >
    > news:...
    >
    > >I thought I could RDP to the web server, open the web.config, make the
    > > change, and save it.

    >
    > > But this causes IIS to hang, and it never recovers - I have to create
    > > a new website in IIS!

    >
    > > Should I be copying the existing web.config, changing it, and then
    > > copying the new version over the old version?

    >
    > > Any help appreciated, it is driving me nuts!
     
    Andy, Jun 12, 2007
    #3
  4. re:
    !> How does an IIS Reset compare with a full restart of IIS?

    Running iisreset.exe from the command-line (IIS reset) executes a full stop/restart of IIS.

    http://www.microsoft.com/technet/pr...2fe-6339-4919-b577-6aa965994a9b.mspx?mfr=true




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "Andy" <> wrote in message
    news:...
    > On 12 Jun, 09:33, "John Timney \(MVP\)" <>
    > wrote:
    >> If you change web.config, IIS should recognise a change has occurred and
    >> restart, loading the new values. I always issue an iisreset after I change
    >> web.config - perhasp that will help you solve your issue.
    >>
    >> Regards
    >>
    >> John Timney (MVP)http://www.johntimney.comhttp://www.johntimney.com/blog


    > How does an IIS Reset compare with a full restart of IIS? Does it do
    > anything differently?
    >
    >> "Andy" <> wrote in message
    >>
    >> news:...
    >>
    >> >I thought I could RDP to the web server, open the web.config, make the
    >> > change, and save it.

    >>
    >> > But this causes IIS to hang, and it never recovers - I have to create
    >> > a new website in IIS!

    >>
    >> > Should I be copying the existing web.config, changing it, and then
    >> > copying the new version over the old version?

    >>
    >> > Any help appreciated, it is driving me nuts!

    >
    >
     
    Juan T. Llibre, Jun 12, 2007
    #4
  5. Andy

    Mythran Guest

    "Andy" <> wrote in message
    news:...
    >I thought I could RDP to the web server, open the web.config, make the
    > change, and save it.
    >
    > But this causes IIS to hang, and it never recovers - I have to create
    > a new website in IIS!
    >
    > Should I be copying the existing web.config, changing it, and then
    > copying the new version over the old version?
    >
    > Any help appreciated, it is driving me nuts!
    >


    If IIS hangs after a web.config change, something is wrong. IIS should not
    hang, but instead it should signal a JIT recompile the next time someone
    accesses a page for that application/application pool.

    HTH,
    Mythran
     
    Mythran, Jun 12, 2007
    #5
  6. Andy wrote:
    > I thought I could RDP to the web server, open the web.config, make the
    > change, and save it.


    Waht did you use to edit the file? Notepad works fine, but if you use an
    editor that lockes the file while editing, this might possible mess up IIS.

    > But this causes IIS to hang, and it never recovers - I have to create
    > a new website in IIS!


    Was it IIS or the web site that did hang?

    > Should I be copying the existing web.config, changing it, and then
    > copying the new version over the old version?


    That would solve the problem if it is the editor that is causing it.

    --
    Göran Andersson
    _____
    http://www.guffa.com
     
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, Jun 12, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Um9iZXJ0?=

    Deployment in 2.0 - How To Not Overwrite web.config

    =?Utf-8?B?Um9iZXJ0?=, Nov 2, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    4,507
    Juan T. Llibre
    Nov 3, 2005
  2. shruti tiwari via JavaKB.com

    overwrite existing value of a textbox with null

    shruti tiwari via JavaKB.com, Apr 2, 2005, in forum: Java
    Replies:
    1
    Views:
    681
    David.Federman
    Apr 3, 2005
  3. ma740988
    Replies:
    1
    Views:
    493
    Kai-Uwe Bux
    Mar 6, 2006
  4. jakester
    Replies:
    3
    Views:
    1,880
    jakester
    Apr 3, 2007
  5. Vikas Gholap
    Replies:
    1
    Views:
    119
Loading...

Share This Page