473,511 Members | 15,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use Stackframe and stacktrace in Windows Service

Hi,
I am facing problem with the use of the stackframe and stacktrace for the
exception hadling with Windows service.

Can any one please tell me how to use of the above objects (stackframe and
stacktrace ) in Window service.

Thanks and regards,
Avinash.
Nov 16 '05 #1
2 3900
Hi,

What exactly problem are you having? Do you get a SecurityException when
accessing System.Diagnostics.StackTrace/System.Diagnostics.StackFrame?

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Avinash" <Av*****@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
Hi,
I am facing problem with the use of the stackframe and stacktrace for the
exception hadling with Windows service.

Can any one please tell me how to use of the above objects (stackframe and
stacktrace ) in Window service.

Thanks and regards,
Avinash.


Nov 16 '05 #2
Hi
Thanks for your reply.

Actually when I am use the Stacktrace and stckframe to get the file name and
line number in the catch block of the any method of the Window service. The
service is getting installed but don't getting start. But if I remove the
stackfame and stacktrace from the catch block and use the service the service
wok normally.

So I just want to handle the exception of the windows service using those
object for getting currentfile name and line number.

Thanks and regards,

Avinash.
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6098
by: Lord Bah | last post by:
I've seen some other posts referring to this problem, but didn't find any solutions. We're trying to log a call stack when we have a problem, using the StackTrace and StackFrame classes in C#....
0
1077
by: lajo_79 | last post by:
my service has a functions that gets triggered by a timer.. my code catches a nullref exception but i cant get the stacktrace for it... i only get information about which function that generated...
3
1428
by: Joe Rattz | last post by:
Moved some asp.net code using StackFrame (built in debug mode) to a Windows Server 2003 box and get empty filename and filelinenumber back. Anyone know why? Works just fine on Win2k.
2
3335
by: HCF_15 | last post by:
Hi all, I have a small piece of code to use StackFrame to GetMethod, I found it is inconsistent in Debug version and Release version, is there anything I am doing wrong? Here is code, build in...
8
7948
by: Mythran | last post by:
Here is some code the provides some really interesting results! First, read over the two methods in class 'A' and compare. Just by looking at them, both results appear to return the EXACT same...
2
2667
by: newscorrespondent | last post by:
I have compiled in DEBUG mode but don't get the debug information from StackFrame class. Is there a specific setting I need to use so that information is included for a debug build. Thanks Tom
6
1720
by: Kristijan Marin | last post by:
Hi, Can please anyone tell me why do i get only the first method in which the exception was thrown and not the line that triggered the exception ? I don't know if I set something in VS2005 wrong...
7
8274
by: sachinkale123 | last post by:
I want to stop Sql server Agent Windows service. I am using below code to stop or start the windows service. Which is I am doing sucessfully. ManagedComputer mc = default(ManagedComputer); ...
8
4031
by: sheldoncs | last post by:
System.InvalidOperationException was unhandled Message="Client found response content type of 'text/plain; charset=utf-8', but expected 'text/xml'. The request failed with the error message: --...
0
7237
marktang
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,...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7074
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...
0
5659
agi2029
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,...
1
5063
isladogs
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...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.