Professional Web Applications Themes

Application_Start event does not fire on restart of IIS? - ASP.NET

Hi Sirs. We are facing weird problems using a web service written in C#. When the web service application is started we have some startup code in the Application_Start event in the Global.asax file. The first time it behaves as expected - but when I restart ( Stop then Start) the Webserver ( through MMC ) in which this webservice is running I expect the Application_Start event to fire again but it doesn't??? The only way I can get the Application_start to fire again is to kill the aspnet_wp.exe proces ( it starts it self again ). The problem is ...

  1. #1

    Default Application_Start event does not fire on restart of IIS?

    Hi Sirs.

    We are facing weird problems using a web service written in C#.
    When the web service application is started we have some startup code in the
    Application_Start event in the Global.asax file.
    The first time it behaves as expected - but when I restart ( Stop then
    Start) the Webserver ( through MMC ) in which this webservice is running I
    expect the Application_Start event to fire again but it doesn't??? The only
    way I can get the Application_start to fire again is to kill the
    aspnet_wp.exe proces ( it starts it self again ).

    The problem is that I need to read a file on start up of the application -
    and I thought that a "Stop then Start" of the webserver would make the
    Application_Start event happen again - but obviously it doesn't. Anybody
    knows how to solve this??

    Regards Morten


    Morten Overgaard Guest

  2. #2

    Default RE: Application_Start event does not fire on restart of IIS?

    Hi Morten,

    Application_Start fires when the first user hits your Web site, and
    Application_End fires when the last user in the site's session times out.
    The Application object exists in the server's memory until the web
    server(not website) stops or until you modify or refresh the global.asax
    file. You may right click the machine name in the MMC, and select "Restart
    IIS" to make the webserver restart.

    You may check the following article for more information.
    Application State
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm[/url]
    l/cpconapplicationstate.asp

    Hope this helps.

    Best regards,
    Lewis

    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    | From: "Morten Overgaard" <movoticon.dk>
    | Subject: Application_Start event does not fire on restart of IIS?
    | Date: Mon, 25 Aug 2003 10:53:29 +0200
    | Lines: 19
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    | Message-ID: <e8#ToZuaDHA.880TK2MSFTNGP09.phx.gbl>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
    | NNTP-Posting-Host: 213.129.10.233
    | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
    | Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservic es:18994
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
    |
    | Hi Sirs.
    |
    | We are facing weird problems using a web service written in C#.
    | When the web service application is started we have some startup code in
    the
    | Application_Start event in the Global.asax file.
    | The first time it behaves as expected - but when I restart ( Stop then
    | Start) the Webserver ( through MMC ) in which this webservice is running I
    | expect the Application_Start event to fire again but it doesn't??? The
    only
    | way I can get the Application_start to fire again is to kill the
    | aspnet_wp.exe proces ( it starts it self again ).
    |
    | The problem is that I need to read a file on start up of the application -
    | and I thought that a "Stop then Start" of the webserver would make the
    | Application_Start event happen again - but obviously it doesn't. Anybody
    | knows how to solve this??
    |
    | Regards Morten
    |
    |
    |

    Lewis Wang [MSFT] Guest

Similar Threads

  1. Fire Event to Server-side
    By Curtis Kam in forum ASP.NET Web Services
    Replies: 2
    Last Post: November 15th, 10:52 PM
  2. Application_Start event
    By Nissim in forum ASP.NET Web Services
    Replies: 5
    Last Post: January 15th, 03:19 AM
  3. UserControl click event won't fire
    By Mark Sisson in forum ASP.NET Building Controls
    Replies: 2
    Last Post: December 2nd, 06:43 PM
  4. how to fire a postback event
    By flashk in forum ASP.NET
    Replies: 1
    Last Post: August 12th, 09:41 AM
  5. HttpApplication Init, Application_Start and Application_End don't fire
    By Halcyon Woodward in forum ASP.NET General
    Replies: 3
    Last Post: July 16th, 04:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139