writing XML file error

  • Thread starter Thread starter Salim Afþar
  • Start date Start date
S

Salim Afþar

Hi,
I get an error (Access to the path "C:\Inetpub\wwwroot\LE\SMS\Mesaj_One.xml"
is denied.) when I do this:
string filename =Request.PhysicalApplicationPath.ToString() +
"/Mesaj_One.xml";
FileStream myFileStream = new FileStream(filename,
System.IO.FileMode.Create);
XmlTextWriter myXmlWriter = new XmlTextWriter(myFileStream,
System.Text.Encoding.Unicode);
dsWrite.WriteXml(myXmlWriter);

Any idea please,
Thanks in advence,
Salim
 
The account under which your application is running doesn't have the
necessary permission.
--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.
 
Hi
Give ASP.NET User Account write permission on the web
folder where you would like to create xml file.

Ravikanth

-----Original Message-----
Hi,
I get an error (Access to the
path "C:\Inetpub\wwwroot\LE\SMS\Mesaj_One.xml"
 
Ravikanth said:
Hi
Give ASP.NET User Account write permission on the web
folder where you would like to create xml file.

How do you do that in WinXP Pro??? I can not find any security/access
property settings.

Jan
 
If you're running XP Pro and your computer is not a member of a domain, you
need to go into Control Panel, Folder Options. In the View tab, uncheck "Use
Simple File Sharing" and you will be able to see the Security tab in your
Folder Properties dialog boxes.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.
 
Back
Top