C
Christoph Wienands
Hey guys,
I just got some really weird behavior. I put the following code into the
Application_Start event in Global.asax:
// init some trace listeners
Uri codeBase = new Uri(Assembly.GetExecutingAssembly().CodeBase);
string fileName = Path.GetDirectoryName(codeBase.LocalPath);
fileName = Path.Combine(fileName, "pmatsiemens_trace" +
DateTime.Now.ToString("yyyyMMddHHmmss") + ".log");
TextWriterTraceListener listener = new TextWriterTraceListener(fileName,
"FileLogger");
Trace.Listeners.Add(listener);
Trace.AutoFlush = true;
Trace.WriteLine("Application started");
When I then run a web application I notice that Application_Start is
executed over and over again. In the output window I see the following error
messages:
Application started
'/LM/W3SVC/1/Root/MyWebApp-34-127730118577453952': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\mywebapp\2e53becd\66ad82af\qf3dspm5.dll', Symbols loaded.
aspnet_wp!library!af4!10/5/2005-10:51:05:: i INFO: Cleaned 0 batch records,
0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running
jobs
Application ended
An unhandled exception of type 'System.Threading.ThreadAbortException'
occurred in Unknown Module.
Additional information: Thread was being aborted.
The program '[2760] aspnet_wp.exe:
/LM/W3SVC/1/Root/MyWebApp-34-127730118577453952' has exited with code 0
(0x0).
The thread '<No Name>' (0x62c) has exited with code 0 (0x0).
Does anybody have a clue why this is happening?
Thanks, Christoph
I just got some really weird behavior. I put the following code into the
Application_Start event in Global.asax:
// init some trace listeners
Uri codeBase = new Uri(Assembly.GetExecutingAssembly().CodeBase);
string fileName = Path.GetDirectoryName(codeBase.LocalPath);
fileName = Path.Combine(fileName, "pmatsiemens_trace" +
DateTime.Now.ToString("yyyyMMddHHmmss") + ".log");
TextWriterTraceListener listener = new TextWriterTraceListener(fileName,
"FileLogger");
Trace.Listeners.Add(listener);
Trace.AutoFlush = true;
Trace.WriteLine("Application started");
When I then run a web application I notice that Application_Start is
executed over and over again. In the output window I see the following error
messages:
Application started
'/LM/W3SVC/1/Root/MyWebApp-34-127730118577453952': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\mywebapp\2e53becd\66ad82af\qf3dspm5.dll', Symbols loaded.
aspnet_wp!library!af4!10/5/2005-10:51:05:: i INFO: Cleaned 0 batch records,
0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running
jobs
Application ended
An unhandled exception of type 'System.Threading.ThreadAbortException'
occurred in Unknown Module.
Additional information: Thread was being aborted.
The program '[2760] aspnet_wp.exe:
/LM/W3SVC/1/Root/MyWebApp-34-127730118577453952' has exited with code 0
(0x0).
The thread '<No Name>' (0x62c) has exited with code 0 (0x0).
Does anybody have a clue why this is happening?
Thanks, Christoph