Hello all,
I am using XmlTextWriter to write some config info into an xml file. It was working fine until some min ago. But, all a sudden, am receiving
"Access to the path 'C:\ab\cd\file.xml' is denied."
XmlTextWriter
tw = new XmlTextWriter(@"c:\ab\cd\file.xml", System.Text.Encoding.Unicode); // this is the line of statement that is returning an error message.
The stack trace looks like:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding)
at StoryCatch.UserChooser.SaveUserInfo() in C:\ab\cd\ef\gh\Source\MKChooser.cs:line 139
I manually checked that i have full previledge to the file. Please help its so urgent.
Thanks,
Zolyit.