P
Peter Morris [Droopy eyes software]
Why on Earth am I suddenly getting this exception when it has been working
for the past 3 months without problems? The line of code that throws the
exception is....
FileStream xmlStream = new FileStream("\\Program
Files\\MyAppFolder\\DataImport.xml", FileMode.Open);
The exception information is.....
System.UnauthorizedAccessException was unhandled
Message="UnauthorizedAccessException"
StackTrace:
at System.IO.__Error.WinIOError()
at System.IO.FileStream..ctor()
at System.IO.FileStream..ctor()
at ......SyncWithServerTask.ImportData()
at ......SyncWithServerTask.SyncWithServer()
at ......SyncWithServerTask.set_CurrentState()
at ......SyncWithServerTask.Next()
at ......MainForm.NextButton_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterModalDialog()
at System.Windows.Forms.Form.ShowDialog()
at ......TaskExecutor.Execute()
at ......Main()
Any help would be greatly appreciated, thanks!
Pete
for the past 3 months without problems? The line of code that throws the
exception is....
FileStream xmlStream = new FileStream("\\Program
Files\\MyAppFolder\\DataImport.xml", FileMode.Open);
The exception information is.....
System.UnauthorizedAccessException was unhandled
Message="UnauthorizedAccessException"
StackTrace:
at System.IO.__Error.WinIOError()
at System.IO.FileStream..ctor()
at System.IO.FileStream..ctor()
at ......SyncWithServerTask.ImportData()
at ......SyncWithServerTask.SyncWithServer()
at ......SyncWithServerTask.set_CurrentState()
at ......SyncWithServerTask.Next()
at ......MainForm.NextButton_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterModalDialog()
at System.Windows.Forms.Form.ShowDialog()
at ......TaskExecutor.Execute()
at ......Main()
Any help would be greatly appreciated, thanks!
Pete