473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

writing XML file error

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
Nov 17 '05 #1
4 2126
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.

"Salim Afþar" <sa****@luckyeye.com> wrote in message
news:uD**************@TK2MSFTNGP10.phx.gbl...
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

Nov 17 '05 #2
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"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
.

Nov 17 '05 #3
Jan

"Ravikanth[MVP]" <dv*********@hotmail.com> skrev i meddelandet
news:07****************************@phx.gbl...
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

Ravikanth

-----Original Message-----
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
.

Nov 17 '05 #4
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.

"Jan" <ja*@dejewski.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...

"Ravikanth[MVP]" <dv*********@hotmail.com> skrev i meddelandet
news:07****************************@phx.gbl...
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

Ravikanth

-----Original Message-----
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
.


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JC | last post by:
I am using Mysql version: 4.0.18-max-log and trying to populate a database from a text file using source option from inside the mysql environment. The population run OK but when creating the...
5
by: zambak | last post by:
Hi I have assignment for some wierd compression alghoritam that will read in from a file convert characters to 5 bit codes and then write out compressed version of the original file. For...
4
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
5
by: grinder | last post by:
first off, i am an extreme newbie to C. i am an undergrad research assistant and i have been shifted to a project that involves building a fairly involved c program. The part that i am stuck on now...
6
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
6
by: paul.anderson | last post by:
This code doesn't work - the first retrieval of t2 returns valid data, the subsequent do not. Please help!!! int main(int argc, char* argc){ struct Test{ int i; int j; intk; int l; }
19
by: rmr531 | last post by:
First of all I am very new to c++ so please bear with me. I am trying to create a program that keeps an inventory of items. I am trying to use a struct to store a product name, purchase price,...
1
by: Smita Prathyusha | last post by:
I am facing a problem in writing to COM1. I am using a Win 32 Console mode Program in VC++ the following is the code: If anyone can help me out it will be of great help : // SC_Using_Classes.cpp...
0
by: mcc99 | last post by:
Amazing, I surfed around to find a simple utility that could list files recursively from a given top folder down through it, writing out the path and filename in simple \path\file_name form, without...
3
by: koutoo | last post by:
I have a code that writes to 2 seperate files. I keep getting a "list index out of range" error. The strange part is that when checking the files that I'm writing too, the script has already...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.