How to use Stackframe and stacktrace in Windows Service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Hi,

What exactly problem are you having? Do you get a SecurityException when
accessing System.Diagnostics.StackTrace/System.Diagnostics.StackFrame?
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top