I'm running a web service with large data sets, and in order to speed up
response to the user have added a method that merely validates the data
and sends back a reply to tell the user to check back later to see if
the data made it into the database.

What I'm doing is to fire up a new thread, passing the data to it, and
then execution of the web service method continues and finishes while
the new thread processes the data.  This works fine, except when I want
to log the new thread's progress by writing to a text file.  I get a
system event log entry description that says:

Event Source:   .NET Runtime 2.0 Error Reporting
Description:
EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4
mscorlib, P5 2.0.0.0, P6 461eee3d, P7 331e, P8 15a, P9
system.unauthorizedaccess, P10 NIL.

Oddly enough, if I make the app itself try to make an entry to the
system event log the attempt fails with an event log entry that says:

EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4
system, P5 2.0.0.0, P6 461ef191, P7 3725, P8 115, P9
system.security.security, P10 NIL.

I've set generous permissions on the target folder, and this doesn't
seem to matter.  Here's the source code starting up the thread:

ExternalProxy p = new ExternalProxy();
ParameterizedThreadStart pts = new
ParameterizedThreadStart(p.AddAGRBatchTransmission);
Thread proxyThread = new Thread(pts);
proxyThread.Start(batchTransmission);

Any ideas how to give the spawned app enough permission to write to a
log?  Or a way to otherwise get around the security problem?

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to