Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2005

Tip: Looking for answers? Try searching our database.

The thread '<No Name>' (0xdc0) has exited with code 0 (0x0).

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
A.M-SG - 30 Nov 2005 21:00 GMT
Hi,

When I run my web service application in VS2005 IDE and then watch the
output window, almost after any method call, I have something like this
message in my output window:

The thread '<No Name>' (0xdc0) has exited with code 0 (0x0).

I tried to get the thread number by putting this line at the top of my web
methid:
System.Diagnostics.Debug.WriteLine(string.Format("Thread info: {0},
{1}",System.Threading.Thread.CurrentThread.Name,System.Threading.Thread.CurrentThread.ManagedThreadId));

But it retuens different thread number. How can I get the thread number that
IDE's output window message shows?

Thank you,

Alan
Steven Cheng[MSFT] - 01 Dec 2005 06:21 GMT
Hi Alan,

Welcome to webservice newsgroup.
From your description you're encountering some unexpected exeption when
calling a asp.net webservice...  As for the threadID difference between the
IDE debugger output one and the Thread.ManagedThreadID, it is because the
Thread.Managed   is an unique ID used by managed world to idenitify a
thread execting .net code while the debugger window's threadID maybe a
operating system scope thread ID(native thread....), their actual relation
ship is determiend by the internal implementation of CLR and most probably
they're different ....

Is your webservice's webmethod doing any particular things which will throw
any unhandled exception ?

Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| From: "A.M-SG" <alanalan@newsgroup.nospam>
| Subject: The thread '<No Name>' (0xdc0) has exited with code 0 (0x0).
[quoted text clipped - 10 lines]
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:30985
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
[quoted text clipped - 9 lines]
| methid:
| System.Diagnostics.Debug.WriteLine(string.Format("Thread info: {0},

{1}",System.Threading.Thread.CurrentThread.Name,System.Threading.Thread.Curr
entThread.ManagedThreadId));

| But it retuens different thread number. How can I get the thread number that
| IDE's output window message shows?
|
| Thank you,
|
| Alan
A.M-SG - 01 Dec 2005 18:10 GMT
Hi Steven,

Is there any way to have the "operating system scope thread ID" within my
web service code?
I need that to track the creation and destruction of threads within my web
method code.

Thank you,
Alan

> Hi Alan,
>
[quoted text clipped - 63 lines]
> |
> | Alan
Steven Cheng[MSFT] - 02 Dec 2005 11:48 GMT
Thanks for your reply Alan,

Of course, we are able to get the unmanaged thread ID, just call the raw
win32 api through PInvoke, the

DWORD GetCurrentThreadId(void);

WIN32 API just help get the current thread ID. However, since I've
mentioned that the underlying thread is managed by CLR runtime, it'll
schedule a underlying operating system thread to work in different
appdomain, so it is possible that the creation time of the underlying win32
thread is not the start of your webservice method executing point....

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "A.M-SG" <alanalan@newsgroup.nospam>
| References: <OqQiQEf9FHA.4084@TK2MSFTNGP10.phx.gbl>
<NmUhw9j9FHA.1236@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: The thread '<No Name>' (0xdc0) has exited with code 0 (0x0).
| Date: Thu, 1 Dec 2005 13:10:37 -0500
[quoted text clipped - 9 lines]
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:31005
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
[quoted text clipped - 64 lines]
| > | methid:
| > | System.Diagnostics.Debug.WriteLine(string.Format("Thread info: {0},

{1}",System.Threading.Thread.CurrentThread.Name,System.Threading.Thread.Curr
| > entThread.ManagedThreadId));
| > |
[quoted text clipped - 5 lines]
| > |
| > | Alan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.