By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,685 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,685 IT Pros & Developers. It's quick & easy.

Access to a file is denied

P: n/a
Hi,
I am trying to create an html based on two main objevts: XslTransform and
XmdTextWrite via asp.net2003 application.
I keep getting a strange msg: "Access to the path... is denied".

Here is my method:
-----------------------
XmlDataDocument xmlDoc=

new XmlDataDocument();
xmlDoc.DataSet.ReadXml(Server.MapPath("test.xml")) ;

XslTransform tran=

new XslTransform();
tran.Load(Server.MapPath("test.xsl"));

XmlTextWriter w=new
XmlTextWriter(Server.MapPath("test.html"),System.T ext.Encoding.UTF8);
tran.Transform(xmlDoc,

null,w);
w.Close();
Jun 7 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello Nimrod,

exception on Server.MapPath("test.xml") or on ReadXml?
Seems that user has no rights to read file

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

NNHi,
NNI am trying to create an html based on two main objevts:
NNXslTransform and
NNXmdTextWrite via asp.net2003 application.
NNI keep getting a strange msg: "Access to the path... is denied".
NNHere is my method:
NN-----------------------
NNXmlDataDocument xmlDoc=
NNnew XmlDataDocument();
NNxmlDoc.DataSet.ReadXml(Server.MapPath("test.xml" ));
NN>
NNXslTransform tran=
NN>
NNnew XslTransform(); tran.Load(Server.MapPath("test.xsl"));
NN>
NNXmlTextWriter w=new
NNXmlTextWriter(Server.MapPath("test.html"),System .Text.Encoding.UTF8)
NN; tran.Transform(xmlDoc,
NN>
NNnull,w); w.Close();
NN>
Jun 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.