Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Access to a file is denied

 
 
=?Utf-8?B?Tmltcm9kIFJvdG5lcg==?=
Guest
Posts: n/a
 
      06-07-2007
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.UTF;
tran.Transform(xmlDoc,

null,w);
w.Close();


 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      06-07-2007
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

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>
NN> XslTransform tran=
NN>
NN> new XslTransform(); tran.Load(Server.MapPath("test.xsl"));
NN>
NN> XmlTextWriter w=new
NN> XmlTextWriter(Server.MapPath("test.html"),System.T ext.Encoding.UTF
NN> ; tran.Transform(xmlDoc,
NN>
NN> null,w); w.Close();
NN>


 
Reply With Quote
 
 
 
Reply

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 asp.net 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



Advertisments