Logging Errors in Web Service?

B

brianpmccullough

Hello All,

I have a web service in which I would like to log all errors to a custom
error log (which is just a comma separated file) so that I don't have to
write to the Event Logs. The idea is to have my application installed to a
virtual directory and have everything live within that directory (including
error logs) so that anyone supporting the application only needs to look in
"one spot" for anything related to the application.

I wrote code to log any exceptions to a "ErrorLogs" subdirectory from the
application's root folder. The problem is that I keep getting an "Access
Denied" error when I hit an excpetion that needs to be logged.

I understand that this has to do with the security settings and the the
identity of the user running the Web Service code not having permissions to
write/create text files on the server.

This application can be used by many thousands of people within the company
and therefore impersonating each user is out of the question (as I don't want
to give Everyone "Write" control to the directory.

Is there a way to allow the Web Service code to write to the file system
programatically?

Thanks!

Brian
 
B

brianpmccullough

I should also note that I the Web Service (.NET 1.1) uses Windows Integrated
Security on IIS 6.0.

What I would like is that ability for the code to be able to write to the
file system, but if a user happened to browse to this directory (or write
their own application to access this directory) they would not be able to do
so.

Thanks!

Brian
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top