Here's the code:
private void SaveUserXml(string user, XmlDocument doc)
{
FileStream file;
FileIOPermission perm;
XmlTextWriter writer;
string xml;
try
{
doc = new XmlDocument();
xml = Server.MapPath("/protoLogin") + "\\xml\\" + user + ".xml";
file = File.Open(xml, FileMode.Create);
writer = new XmlTextWriter(file, null);
doc.WriteTo(writer);
writer.Close();
file.Close();
}
catch (Exception ex)
{
int i = 0;
}
}
Here's the exception I get:
>? ex.Message
"Access to the path \"D:\\work\\protoLogin\\xml\\sonny.xml\" is denied."
Any thoughts on this would be greatly appreciated.
thx...sonny
Jon - 06 Dec 2005 09:43 GMT
Give the user IIS is running under write access to that directory
Jon
> Here's the code:
> private void SaveUserXml(string user, XmlDocument doc)
[quoted text clipped - 27 lines]
>
> thx...sonny
sonny - 07 Dec 2005 02:10 GMT
Thanks Jon. I thought I had given the folder proper permissions, but I didn't.
I can save over the existing file, now I just have to correct some logic :)
...sonny
> Give the user IIS is running under write access to that directory
>
[quoted text clipped - 31 lines]
> >
> > thx...sonny