« Previous Next »

Thread: Service restart when switching ASP.Net versions

Last post 09-04-2008 7:23 AM by janebush08. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 05-09-2007, 9:55 AM

    • IainH
    • Not Ranked
    • Joined on 05-09-2007, 1:28 PM
    • Posts 4

    Service restart when switching ASP.Net versions

    Hi All, 

    I have an IIS server 6 on a win 2000 machine on which is installed both .NET 1.1 & 2.0 and every time I create a web site it defaults the site to 1.1.  This would be fine but I’ve noticed that when I go to switch the version of the site to 2.0 in MMC in the ASP.NET tab the entire W3 service does a restart bringing down every site we have on the server.  There are a large number of sites on the server and it can take up to 20 seconds for the service to recycle and for some reason not every site comes back up (leaving a Service Unavailable message) and it takes someone to go and manually restart the web site before it can.

    So I was just wandering whether anyone else had noticed this?  Is there a way to get all new web sites to default to 2.0 rather than 1.1 and if not is there a way to swap the site from 1.1 to 2.0 without the service restart.

    Thanks in advance,

    Iain

  • 05-09-2007, 4:44 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,079

    Re: Service restart when switching ASP.Net versions

    Since 1.1 and 2.0 sites can't use the same application pool, are you also assigning a new app pool when you switch it to 2.0?
  • 05-10-2007, 3:37 AM In reply to

    • IainH
    • Not Ranked
    • Joined on 05-09-2007, 1:28 PM
    • Posts 4

    Re: Service restart when switching ASP.Net versions

    Hi Tom,

    Don't think this is to do with the application pool.  Heres the sequence of events.  I have 2 application pools - the default and one specifically for ASP2 sites. 

    I create the new web site which defaults to NET 1.1 and the default application pool - the folder the site is pointed to is empty.

    Switch the application pool from the default to ASP2 pool hit apply - no problems - all sites are  still viewable.

    Go into ASP.NET tab and switch version from 1.1 to 2.0 hit apply - loss of service - all web sites are displaying "Service Unavailable" for a time.

     Seems its not the application pool but the switching of the version which is causing the issue.  This usually wouldn't be an issue but its a very busy web server and some customers are noticing the downtime especially with the sites which don't come back up after the service restarts.

  • 05-10-2007, 8:42 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,079

    Re: Service restart when switching ASP.Net versions

    Can you set the root of the site to be 2.0?  That should then have all new sites start as 2.0.
  • 05-10-2007, 9:41 AM In reply to

    • IainH
    • Not Ranked
    • Joined on 05-09-2007, 1:28 PM
    • Posts 4

    Re: Service restart when switching ASP.Net versions

    Sadly the default web site is set up to work on the 1.1 framework so I'm stuck with that set up.

     I thought maybe this was an issue with my particular web server but I've managed to replicate it on 2 other Win2003s.  Seems to be very odd behaviour for a web server to go down like that without warning.  Maybe I'm doing something wrong?!?

  • 05-10-2007, 9:13 PM In reply to

    Re: Service restart when switching ASP.Net versions

    aspnet_regiis -sn w3svc look at using the command in the appropriate .NET version folder.  C:\windows\microsoft.net\framework\v2.0*  Make sure you test on a non-production box and such.  Backups, test, test, test!
    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 05-15-2007, 6:45 AM In reply to

    • IainH
    • Not Ranked
    • Joined on 05-09-2007, 1:28 PM
    • Posts 4

    Re: Service restart when switching ASP.Net versions

    Cheers Steve.

     That led me to find the -norestart switch on the aspnet_regiis command.

     Seems the default behaviour of the ASP.NET tab is to execute the aspnet_regiis command to switch .NET versions without the -norestart switch.  This causes the w3 service to do a complete restart bringing down all the sites temporarily.  Seems odd default behaviour.... anyone know why M'Soft does this?  Is there a good reason to restart W3 as default when switching the version of one site?

  • 05-16-2007, 5:00 PM In reply to

    Re: Service restart when switching ASP.Net versions

    Good deal.  I'm not sure what the reasoning behind the restart is.  

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 09-04-2008, 7:23 AM In reply to

    Re: Service restart when switching ASP.Net versions

     Ya.. it is different than what it actually seems...

Page 1 of 1 (9 items)