G
Guest
I have written a Web Service in C# that attempts to log error information on
our Web Server. The code below sets the path where the error information is
to be written:
string sFilePath = Server.MapPath("XML/")
ExceptionManager.PublishIt(sStartElement,sFilePath, sLog,sKey,sStoredProc,oParms);
I am calling a procedure that writes the data out to an XML file on the
server. I get an Access Denied error when I try to run this line of code:
StreamWriter sw = new StreamWriter (sFileName, false, Encoding.UTF8);
This codes works when I am writing error data to a directory on a user's
local machine but when I use the Web Service to log the error, an access
denied error occurrs.
How can I overcome this security issue on a Web Server so that I can write
to a file?
our Web Server. The code below sets the path where the error information is
to be written:
string sFilePath = Server.MapPath("XML/")
ExceptionManager.PublishIt(sStartElement,sFilePath, sLog,sKey,sStoredProc,oParms);
I am calling a procedure that writes the data out to an XML file on the
server. I get an Access Denied error when I try to run this line of code:
StreamWriter sw = new StreamWriter (sFileName, false, Encoding.UTF8);
This codes works when I am writing error data to a directory on a user's
local machine but when I use the Web Service to log the error, an access
denied error occurrs.
How can I overcome this security issue on a Web Server so that I can write
to a file?