PC Review


Reply
Thread Tools Rate Thread

Access to a file is denied

 
 
=?Utf-8?B?Tmltcm9kIFJvdG5lcg==?=
Guest
Posts: n/a
 
      7th Jun 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.Text.Encoding.UTF8);
tran.Transform(xmlDoc,

null,w);
w.Close();


 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      7th Jun 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.Text.Encoding.UTF8)
NN> ; tran.Transform(xmlDoc,
NN>
NN> null,w); w.Close();
NN>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
File access is denied to a outlook.pst file across a network =?Utf-8?B?REpD?= Microsoft Outlook Discussion 1 6th Nov 2005 04:32 PM
File Access Denied =?Utf-8?B?Sm9obg==?= Windows XP Security 1 27th Mar 2005 11:03 AM
File access denied, you dont have permission to access this file =?Utf-8?B?Smlt?= Microsoft Outlook BCM 1 14th Mar 2005 08:05 PM
RE: Error Copying File or Folder - Access denied - The source file may be in use diasmith [MSFT] Microsoft Windows 2000 Security 0 30th Oct 2003 08:41 PM
A failure occurred writing to the resources file. Access is denied. -- RESX file is locked? -- WHY? Mark Kamoski Microsoft ASP .NET 1 4th Jul 2003 01:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:02 PM.