[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Access to the path "C:\tmp" is denied running Visual C# Walkthrough: Reading XML Data into a Dataset

Posted on 2006-07-23
2
Medium Priority
?
540 Views
Last Modified: 2008-02-01
I am running the Visual C# .NET sample program - Visual C# Walkthrough: Reading XML Data into a Dataset, and getting the following error:
       An unhandled exception of type 'System.UnauthorizedAccessException' occurred in system.xml.dll
       Additional information: Access to the path "C:\tmp" is denied.
On the code lines:
      string filePath = "C:\\tmp";
      dsAuthors.ReadXml(filePath);

I have checked the attributes for C:\tmp  using command "attrib" and read only is not on.
I am logged in as Administrator.

What else should I look at?

                  
0
Comment
Question by:GaryHoff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 1000 total points
ID: 17163114
string filePath = "C:\\tmp";

I think this should be some XML file, like:

string filePath = "C:\\tmp\\data.xml";
0
 
LVL 1

Author Comment

by:GaryHoff
ID: 17164502
That was it.  I thought the dataSource name was appended to the path - not so.
The path and filename are required.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question