How to get admin Access in my Project?
FileStream fs=new FileStream("c:/samplehubdata.xml",
FileMode.OpenOrCreate,
FileAccess.ReadWrite,
FileShare.ReadWrite);
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
Go to your project and click add Select Visual C# Items Select "Application Manifest File" Call this app.manifest (I guess it is by default)