Re: Why does Application_Start fire twice?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alvin Bruney [MVP] (vapor)
Date: 04/27/04


Date: Tue, 27 Apr 2004 10:16:22 -0500

that looks ok to me, no symbols are typically for release assemblies like
system.web.

what you will need to do here is roll up your sleeves and do some debugging.
If you can reproduce the problem, set a break point inside the
application_end event in global asax and let the application start up. If
you do not have code inside the application_end put some immaterial code
like string str = string.empty;

When the break point catches, have a look at the call stack window. It will
tell you which routine called/caused the restart and then you can work from
there. Clicking on the callstack line will take you to the handler causing
the restart.

Be aware though, that after the first break point fires in visual studio.
You will will need to make an immaterial change to the web config file for
the break point to hold again later because studio does some optimization in
the background to prevent the application object from starting again even if
you rebuild the project.

-- 
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Rashad Rivera" <rashadrivera.I_HATE_SPAM@SPAM_REALLY_SUCKS.hotmail.com> 
wrote in message news:O6EOdx9KEHA.1348@TK2MSFTNGP12.phx.gbl...
>I looked into what you said and noticed that the application is restarting,
> but nothing is written to the event log about a problem.  I do, however, 
> get
> something strange in the output log when I debug the ASPNET process.  Does
> it make any scense to you?...
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dl
> l', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
> symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.dr
> awing.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dl
> l', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.
> dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3
> a\system.enterpriseservices.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3
> a\system.enterpriseservices.thunk.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d
> 50a3a\system.web.regularexpressions.dll', No symbols loaded.
>
> The thread '<No Name>' (0xa60) has exited with code 0 (0x0).
>
> The thread '<No Name>' (0x7d4) has exited with code 0 (0x0).
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\syst
> em.web.services.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\assembly\dl2\3d9fe998\dd64f64d_dc2bc401\www.con
> struct.x.dll', Symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system
> .web.mobile.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\assembly\dl2\90f12471\7d08e4b5_bd11c401\www.ome
> gusprime.com.dll', Symbols loaded.
>
> '/LM/W3SVC/2/Root-21-127275058922282614': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\kqbfn4ej.dll', Symbols loaded.
>
> An unhandled exception of type 'System.Threading.ThreadAbortException'
> occurred in Unknown Module.
>
> Additional information: Thread was being aborted.
>
> 'Domain23': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
> loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dl
> l', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
> symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.dr
> awing.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dl
> l', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.
> dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3
> a\system.enterpriseservices.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3
> a\system.enterpriseservices.thunk.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d
> 50a3a\system.web.regularexpressions.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\kqbfn4ej.dll', Symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\assembly\dl2\3d9fe998\dd64f64d_dc2bc401\www.con
> struct.x.dll', Symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\syst
> em.web.services.dll', No symbols loaded.
>
> The program '[2244] aspnet_wp.exe: /LM/W3SVC/2/Root-21-127275058922282614'
> has exited with code 0 (0x0).
>
> The thread '<No Name>' (0xa48) has exited with code 0 (0x0).
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system
> .web.mobile.dll', No symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\assembly\dl2\90f12471\7d08e4b5_bd11c401\www.ome
> gusprime.com.dll', Symbols loaded.
>
> '/LM/W3SVC/2/Root-22-127275058954156594': Loaded
> 'd:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\root\8c383b65\bf36bbde\83lnfyzz.dll', Symbols loaded.
>
>
>
>
>
> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
> news:%23sdDfN8KEHA.3684@TK2MSFTNGP12.phx.gbl...
>> it can't really start twice. it has to start, end and start again so you
>> need to find out what is causing it to end. your first bet is to look up
> the
>> application event logs
>>
>> -- 
>> Regards,
>> Alvin Bruney
>> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
>> Got tidbits? Get it here... http://tinyurl.com/27cok
>> "Rashad Rivera" <rashadrivera.I_HATE_SPAM@SPAM_REALLY_SUCKS.hotmail.com>
>> wrote in message news:uUexh07KEHA.620@TK2MSFTNGP10.phx.gbl...
>> >I need to know why the Application_Start function fires twice when it
>> > initializes.  It is doing double work and messing up my process. 
>> > Thanks
>> > for
>> > your help
>> >
>> > - Rashad
>> >
>> >
>>
>>
>
> 


Relevant Pages

  • Re: Computer will not shut down after installing Security Update KB2393802
    ... adapters, and this computer has an NVIDIA GeForce2 MX/MX 400 display ... results from kernel stack exhaustion. ... It doesn't matter how I try to select "Shutdown", the computer simply reboots just as if I'd selected Restart instead. ... But as I do this for fun more than anything else, I'm not sure what to look for in the Event Log. ...
    (microsoft.public.windowsxp.general)
  • Re: ASP.NET does not use latest DLL in bin folder
    ... The strange part is that I had been merrily just updating the dll for the ... console open too in case I have to restart the App Pool too. ... >> of code changes seemed simple in that all I did was replace the ... > restart that individual site, or if it's 2003 the app pool. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Continuing problems with event logs (Service Control Manager Logs)
    ... Terminal Services sent a start control ... Network Location Awareness entered running state ... the restart, is a w32time error (The time provider NtpClient cannot ... >> the event log goes back to normal. ...
    (microsoft.public.windows.server.general)
  • Re: Access custom objects from codebehind
    ... With 2003 you can flush the app pool or restart the SITE as well. ... > After using an assembly compiled into a DLL and added to the assembly ... > production server, opening vnc and running gacutil, etc...). ... > assembly cache, we only had to use Import statement. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS Health Monitoring via ASP.NET
    ... Did asked your provider to give you the Event log of the server on suspected dates when the error occurred? ... I suspect that my ADO.NET calls to SQL Server have something to do with ... There is always a application restart when I ...
    (microsoft.public.dotnet.framework.aspnet)