FileStream fs=new FileStream("c:/samplehubdata.xml",
FileMode.OpenOrCreate,
FileAccess.ReadWrite,
FileShare.ReadWrite);
You usually cannot create a file on Windows in C:\\
without admin priviliges.
Try creating it in your user folder instead.
Write this to get admin access to write on C
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
to your app.manifest You can create this file if you are not able to see the app.manifest. If you want to know more about the app.manifest you can look here
//edited because he wanted to know how
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.