Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

System.UnauthorizedAccessException from closing my app?

I used the Setup project to create an installer and it installed OK.
But I try to close my app, it is giving me this error.

My app creates this xml file in my application folder under program Files folder.

If I use the ClickOnce install, it works fine and closes.

Why not use ClickOnce install then?

My VS is not creating the Setup.exe file but only .application file (today).
It created the setup file last night but today and i have same project.
It is driving me nut!

Any sugget as why I am getting this error?

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:\Program Files (x86)\WebTool\Settings.xml' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
SOLUTION
Avatar of p_davis
p_davis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial