Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Permissions error creating a xml document

Posted on 2013-11-20
3
Medium Priority
?
276 Views
Last Modified: 2013-11-20
What permissions do I need?  This is my own machine.


XmlTextWriter textWriter = new XmlTextWriter("C:\\myXmFile.xml", null);
            // error A required privilege is not held by the client.

Thanks,
0
Comment
Question by:Dovberman
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 1200 total points
ID: 39663813
You need write permission to the root of the C: drive. Try writing it to your "My Documents" folder to confirm that it is just the root you cannot write to.

Actually, having just realized this is an ASP.Net question - the account that IIS is running under will need write permissions (assuming you aren't doing any kind of impersonation, etc)
0
 

Author Comment

by:Dovberman
ID: 39663895
I wrote to a folder that I have permissions for.

Thanks
0
 

Author Closing Comment

by:Dovberman
ID: 39663898
I wrote to a folder that I have permissions for.

Thanks
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

783 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