Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Access to a file is denied

Thread Tools

Access to a file is denied

Posts: n/a
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();

XmlTextWriter w=new
XmlTextWriter(Server.MapPath("test.html"),System.T ext.Encoding.UTF;


Reply With Quote
Michael Nemtsev
Posts: 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:
Team blog:

"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

NN> Hi,
NN> I am trying to create an html based on two main objevts:
NN> XslTransform and
NN> XmdTextWrite via asp.net2003 application.
NN> I keep getting a strange msg: "Access to the path... is denied".
NN> Here is my method:
NN> -----------------------
NN> XmlDataDocument xmlDoc=
NN> new XmlDataDocument();
NN> xmlDoc.DataSet.ReadXml(Server.MapPath("test.xml")) ;
NN> XslTransform tran=
NN> new XslTransform(); tran.Load(Server.MapPath("test.xsl"));
NN> XmlTextWriter w=new
NN> XmlTextWriter(Server.MapPath("test.html"),System.T ext.Encoding.UTF
NN> ; tran.Transform(xmlDoc,
NN> null,w); w.Close();

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Access Denied to access db with Ros@ ASP .Net 3 02-22-2006 04:51 PM
A failure occurred writing to the resources file. Access is denied. -- RESX file is locked? -- WHY? Mark Kamoski ASP .Net 1 07-04-2003 12:02 PM