UnauthorizedAccessException

jtarchi

New member
Joined
Aug 11, 2005
Messages
2
Programming Experience
1-3
Hello all,

As of this morning I officially have a new road block in getting my system service started. How excited I have been to whack my head against a wall all day. Here's the thing...

My system service watches for the creation of TIFF files in a given directory. Upon arrival it uses the Office 2003 MODI tool to OCR the TIFF and create a text file of the text. The service checks to ensure the files and respective directories don't already exist (deletes if necessary), creates the destination directory, and moves the TIFF and text files to their final destination. With that done the service tries to create an HTML file in the same directory. Somewhere in that process (between moving files, creating directories, and creating the html file) I receive the following error:

"System.UnauthorizedAccessException was unhandled
Message: Access to the path 'C:\My Path' is denied."

The parent directory access rights is set to Everyone, and that propogates to all child directories. Indexing is turned off on all directories as well. I don't impersonate, but I shouldn't have to. What's worse, it worked yesterday and I don't have a clue as to what I did to muck it up.

Thoughts, suggestions, sledge hammers? Any and all are welcome. Thanks so much.

Jeff
 
Hi,

I also faced the same error long back while writing Data to a file. and the error was gone when i had set all permissions to the user under which the service was running.

I think along with Permissions to everyone the specific user needs all writes if the services is running on Domain User account . plz see if i am correct

Thanks
Jay
 
problem solved - for now

I took some time off, came back fresh to this app and, per Murphy to some degree, it worked fine. I still have some load testing to do, some performance numbers to run, and other assorted cleanup before a production rollout so I somewhat expect to see the error again. If I do, I'll let you know what happens after I've implemented your fix.

Thanks for the help.

Jeff
 
Back
Top