writing to a file from a dll

  • Thread starter Thread starter Kristof Thys
  • Start date Start date
K

Kristof Thys

Hello,

I'm writing a webservice in ASP.net, wich uses a dll. In this dll I'm
trying to write to a temporary file. But this does not seem to work.
When I build the dll as an exe it works perfect.
Is there something wrong with write permissions, and where should I
adjust this?


grtz,


Kristof
 
Hi

The website runs under a predefined username which can be changed.
The account it runs under is normally a very ristricted account and
therefore cannot do the same things an EXE can do.

Try the following

1. You can give this account more permissions
2. Give the account read/write access to the log file

However, if it's just logging you're after then I would suggest you
use the event log.

Good luck
 
Quite possibly it is a permissions issue. Are you getting an exception
or error code? Does the ASPNET account (NETWORK SERVICE account in IIS
6) have write permissions on the directory?
 
Back
Top