My immediate guess is this:
You have to run your application with Admin rights to save the file. It's not enough that your user account is an admin account.
You can do this by changing the program manifest: Right click your project in the solutions explorer, add new item and choose application manifest.
Open the manifest and change
<requestedexecutionlevel level="asInvoker" uiaccess="false" />
to
<requestedexecutionlevel level="requireAdministrator" uiaccess="false" />
Just my guess...
Also be aware that Windows will try to protect some parts of your file system more than others. It can be hard to get access to write a file in the C-root or in e.g. C:\Windows.
It's easier to get permission to write in the document folder or the app's program data folder.