Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Permissions error creating a xml document

Posted on 2013-11-20
3
Medium Priority
?
275 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
[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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

671 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