Hey guys,
I just got some really weird behavior. I put the following code into the
Application_Sta rt event in Global.asax:
// init some trace listeners
Uri codeBase = new Uri(Assembly.Ge tExecutingAssem bly().CodeBase) ;
string fileName = Path.GetDirecto ryName(codeBase .LocalPath);
fileName = Path.Combine(fi leName, "pmatsiemens_tr ace" +
DateTime.Now.To String("yyyyMMd dHHmmss") + ".log");
TextWriterTrace Listener listener = new TextWriterTrace Listener(fileNa me,
"FileLogger ");
Trace.Listeners .Add(listener);
Trace.AutoFlush = true;
Trace.WriteLine ("Applicatio n started");
When I then run a web application I notice that Application_Sta rt is
executed over and over again. In the output window I see the following error
messages:
Application started
'/LM/W3SVC/1/Root/MyWebApp-34-127730118577453 952': Loaded
'c:\windows\mic rosoft.net\fram ework\v1.1.4322 \temporary asp.net
files\mywebapp\ 2e53becd\66ad82 af\qf3dspm5.dll ', Symbols loaded.
aspnet_wp!libra ry!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.Threadi ng.ThreadAbortE xception'
occurred in Unknown Module.
Additional information: Thread was being aborted.
The program '[2760] aspnet_wp.exe:
/LM/W3SVC/1/Root/MyWebApp-34-127730118577453 952' 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 4 1824
Christopher,
This is only a guess, but normally in .NET when you change the web.config
file and re-save or change a .dll file and re-save the application restarts
to get the new code. Whatever listner triggers the application restart might
be triggered by your code that is writing to the application's directory.
Try saving elswhere. I think that will resolve the issue.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Christoph Wienands" <ch************ ****@siemens.re move.com> wrote in
message news:un******** *****@tk2msftng p13.phx.gbl... Hey guys,
I just got some really weird behavior. I put the following code into the Application_Sta rt event in Global.asax:
// init some trace listeners Uri codeBase = new Uri(Assembly.Ge tExecutingAssem bly().CodeBase) ; string fileName = Path.GetDirecto ryName(codeBase .LocalPath); fileName = Path.Combine(fi leName, "pmatsiemens_tr ace" + DateTime.Now.To String("yyyyMMd dHHmmss") + ".log"); TextWriterTrace Listener listener = new TextWriterTrace Listener(fileNa me, "FileLogger "); Trace.Listeners .Add(listener); Trace.AutoFlush = true; Trace.WriteLine ("Applicatio n started");
When I then run a web application I notice that Application_Sta rt is executed over and over again. In the output window I see the following error messages:
Application started '/LM/W3SVC/1/Root/MyWebApp-34-127730118577453 952': Loaded 'c:\windows\mic rosoft.net\fram ework\v1.1.4322 \temporary asp.net files\mywebapp\ 2e53becd\66ad82 af\qf3dspm5.dll ', Symbols loaded. aspnet_wp!libra ry!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.Threadi ng.ThreadAbortE xception' occurred in Unknown Module. Additional information: Thread was being aborted. The program '[2760] aspnet_wp.exe: /LM/W3SVC/1/Root/MyWebApp-34-127730118577453 952' 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
The ThreadAbortExce ption is a bit of a trick ASP.NET uses when a Response.Redire ct
is used.
-Brock
DevelopMentor http://staff.develop.com/ballen Hey guys,
I just got some really weird behavior. I put the following code into the Application_Sta rt event in Global.asax:
// init some trace listeners Uri codeBase = new Uri(Assembly.Ge tExecutingAssem bly().CodeBase) ; string fileName = Path.GetDirecto ryName(codeBase .LocalPath); fileName = Path.Combine(fi leName, "pmatsiemens_tr ace" + DateTime.Now.To String("yyyyMMd dHHmmss") + ".log"); TextWriterTrace Listener listener = new TextWriterTrace Listener(fileNa me, "FileLogger "); Trace.Listeners .Add(listener); Trace.AutoFlush = true; Trace.WriteLine ("Applicatio n started"); When I then run a web application I notice that Application_Sta rt is executed over and over again. In the output window I see the following error messages:
Application started '/LM/W3SVC/1/Root/MyWebApp-34-127730118577453 952': Loaded 'c:\windows\mic rosoft.net\fram ework\v1.1.4322 \temporary asp.net files\mywebapp\ 2e53becd\66ad82 af\qf3dspm5.dll ', Symbols loaded. aspnet_wp!libra ry!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.Threadi ng.ThreadAbortE xception' occurred in Unknown Module. Additional information: Thread was being aborted. The program '[2760] aspnet_wp.exe: /LM/W3SVC/1/Root/MyWebApp-34-127730118577453 952' 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
> This is only a guess, but normally in .NET when you change the web.config file and re-save or change a .dll file and re-save the application restarts to get the new code. Whatever listner triggers the application restart might be triggered by your code that is writing to the application's directory. Try saving elswhere. I think that will resolve the issue.
Goood catch! Should have thought of that myself. Whenever a file changes in
the bin directory the app seems to restart. Now I just save it to a log
directory.
Thanks, Christoph
Christoph,
Lucky guess... YW :-)
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Christoph Wienands" <ch************ ****@siemens.re move.com> wrote in
message news:Ok******** ******@TK2MSFTN GP12.phx.gbl... This is only a guess, but normally in .NET when you change the web.config file and re-save or change a .dll file and re-save the application restarts to get the new code. Whatever listner triggers the application restart might be triggered by your code that is writing to the application's directory. Try saving elswhere. I think that will resolve the issue.
Goood catch! Should have thought of that myself. Whenever a file changes in the bin directory the app seems to restart. Now I just save it to a log directory.
Thanks, Christoph This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark Phillips |
last post by:
Hello,
I am having a problem in which a file can get stuck open when a thread
that is attempting to write to it gets aborted (ThreadAbortedException
occurs). The log file gets stuck open until the process is shut down
(cannot delete file from Windows Explorer, for example). My test
application stops execution with:
An unhandled exception of type 'System.IO.IOException' occurred in
mscorlib.dll
Additional information: The process...
|
by: David Waz... |
last post by:
Moved an app from W/2000 Asp V1.0 to
W/2003, VS/2003, ASPV 1.1
Page runs a long job, uploading 2 large fixed length files
(300,000 rows) into SQL database. A process is run
against the data, and altered flat-files produced.
The job aborts at EXACTLY 105 seconds (1 min, 45 seconds)
regardless of WHERE in the process we are - could be DB
read, DB write, string manipulation - whatever.
|
by: Chee |
last post by:
Hi all
Please forgive me if this has been asked before. I am getting a ThreadAbortException in "Unknown Module" when i try to load a page from VS.NET. One problem is it does not happen all the time. But with more projects being added to the reference list, I will get it more often. When it happens, I loss information in the Session as it get restarted, and some event doesn't happened (i.e. IndexChanged event in dropdownlist, onclick event...
|
by: splap20 |
last post by:
Every day a large chunk of XML is posted up to my app via http. The app
interprets this XML and writes results to a SQLServer. Occasionally a
ThreadAbortException is thrown during this process. Despite being
caught, this exception propagates all the way up the call stack. I know
this is by design and that I can use Thread.ResetAbort to stop this
exception from bubbling up the stack.
But I want to know why the exception is thrown in the...
|
by: Eric |
last post by:
I have the following situation: I was getting intermittent errors using
Reponse.Redirct("url", true) and was trying to catch the
ThreadAbortException, but it was not staying caught and was showing up again
where my code wasnt expecting it. I'm not sure what was causing it. The
catch block in RedirectPage is supposed to quash the ThreadAbortException
but it not only shows up there, but also in the outer catch block will catch
it as well....
| |
by: foolmelon |
last post by:
If a childThread is in the middle of a catch block and handling an
exception caught, the main thread calls childThread.Abort(). At that
time a ThreadAbortException is thrown in the childThread. The question
is: after the ThreadAbortException is thrown, does the childThread
continue run the remaining code in the catch block?
|
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= |
last post by:
Hi,
I am running a web service which sometimes throws exceptions. I have a
lot of error trapping within the web service, but I have missed the current
problem. I am working on the current issue, but there even when I get this
fixed, there may be others I have not thought of. My immediate problem is
that the web service seems to throw a threadabortexception to the client when
it has an uncaught exception (I may be wrong. I am a bit confused...
|
by: Zeba |
last post by:
Hi !
I am using a httphandler to perform some url rewriting in my
application. My web.config contains the following entry to direct all
urls containing /App/*.ashx to my class AppHandler.cs in namespace
mySite.Web
<httpHandlers>
<add verb="*" path="App/*.ashx"
type="mySite.Web.AppHandler, App_Code"/>
|
by: Morgan Cheng |
last post by:
It is recommended that to re-throw Exception in catch block with just
"throw;" instead of "throw ex;", because "throw ex;" lose the original
Exception's stack trace.
ThreadAbortException will be re-thrown automatically even it is not
throw explicitly in catch block. However, it seems that is re-thrown
with "throw ex", not just "throw". So, the stack trace is lost.
I am wondering why .Net recommend people to use "throw" but doesn't
use...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |