Hi, friends,

I have an asp.net project, and I have a DB.dll used to retieve data from DB.
In DB.dll, I used catch{} in try/catch statements to write errors into a log
file, if there is any.

However, when DB.dll tried to write errore to the log file I specified by

System.IO.File.AppendText(mLoggerFileName)

I got an exception error:

"Access to the path
\"c:\\inetpub\\wwwroot\\msc\\log\\MSCExceptionLogger.log\" is denied."

I then used Windows Explorer, found c:\inetput\wwwroot\msc\log directory,
right clicked on it, selected Sharing and Security, in the Web Sharing tab,
selected Write access right and Applicatoin permission with None. It still
did not work.

Any ideas? Any reference paper or step-by-step guildance on how to give
access permission?

Thanks a lot.

Re: Access denied problem by Ken

Ken
Mon Oct 31 22:20:28 CST 2005

Hi,

Remove the "web sharing"

Instead, goto the "Security" tab, and adjust the NTFS permissions
appropriately. If you do not have a security tab, then you may need to
disable Simple File Sharing first (in explorer: Tools -> Folder Options ->
View -> uncheck "Use Simple File Sharing (Recommended)"

Cheers
Ken

"Andrew" <Andrew@discussions.microsoft.com> wrote in message
news:2865D848-9071-4A6C-8A0A-259A51C18CCD@microsoft.com...
: Hi, friends,
:
: I have an asp.net project, and I have a DB.dll used to retieve data from
DB.
: In DB.dll, I used catch{} in try/catch statements to write errors into a
log
: file, if there is any.
:
: However, when DB.dll tried to write errore to the log file I specified by
:
: System.IO.File.AppendText(mLoggerFileName)
:
: I got an exception error:
:
: "Access to the path
: \"c:\\inetpub\\wwwroot\\msc\\log\\MSCExceptionLogger.log\" is denied."
:
: I then used Windows Explorer, found c:\inetput\wwwroot\msc\log directory,
: right clicked on it, selected Sharing and Security, in the Web Sharing
tab,
: selected Write access right and Applicatoin permission with None. It still
: did not work.
:
: Any ideas? Any reference paper or step-by-step guildance on how to give
: access permission?
:
: Thanks a lot.
:



Re: Access denied problem by Andrew

Andrew
Tue Nov 01 03:37:32 CST 2005

> "Access to the path
> \"c:\\inetpub\\wwwroot\\msc\\log\\MSCExceptionLogger.log\" is denied."
>
> I then used Windows Explorer, found c:\inetput\wwwroot\msc\log

c:\\inetpub\\wwwroot\\msc\\log\\MSCExceptionLogger.log\
c:\inetput\wwwroot\msc\log

Notice how one has \\ everywhere it should have \ and also I suspect you
don't want the trailing \ because that would refer to a directory named
MSCExceptionLogger.log rather than a file of that name.

Unless you habitually mostly escape \ and " when you're posting to
newsgroups, that is.

Andrew