On Oct 15, 9:33*pm, "Jeff" <some...@somewhere.comwrote:
Quote:
Hi
>
I'm fairly new to ASP.NET and am running Visual Studio 2005. I'm having a
problem implementing a guestbook page - wondered if someone could shed some
light on where I'm going wrong?
>
The application runs ok on my local server, but when I try running it on my
remote web hosting service I seem to have problems saving the xml file.
Here's a summary of the message I receive when I hit my submit button and
try to write back into the guestbook:
>
Access to the path 'C:\Inetpub\vhosts\**********\httpdocs\guestbook.x ml' is
denied
>
Source Error:
>
Line 35: * * * * // Insert data into the XML doc and save
Line 36: * * * * myXmlDocument.DocumentElement.InsertBefore(myXmlEl ement,
myXmlNode);
Line 37: * * * * myXmlDocument.Save(Server.MapPath("~/guestbook.xml"));
Line 38:
Line 39: * * * * // Re-bind data since the doc has been added to
>
It reads the guestbokk ok, but it looks almost like the file is read-only-
although I'm sure I didn't set it as such.
Is anyone familiar enough with the Parallels hosting service to advise me
how to ensure that the file attributes are correctly set?
Can I test the attributes from a browser?
>
Thanks for any help
>
Jeff
Hi Jeff
this message means that the user account used for ASP.NET has no
rights to write in a files in that directory. The IIS Process Model on
IIS 6+ uses the NETWORK SERVICE account, and IIS 5 uses the ASPNET
account. You need to go to the control panel of your hosting service
and give write access for the required directory.
Hope this helps