I'm getting this error in an application that I'm 100% sure was working half an hour ago. I'm working on a project on a stand alone p.c. so issues with security access to the file i am trying to read should not be an issue. I created the files et cetera.
This is the error
Exception: System.UnauthorizedAccessException: Access to the path "C:\Documents and Settings\nnichol1\Desktop\testXSD.xsd" is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReader.CreateScanner() at System.Xml.XmlTextReader.Init() at System.Xml.XmlTextReader.Read() at System.Xml.XmlValidatingReader.ReadWithCollectTextToken() at System.Xml.XmlValidatingReader.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Project1.xmlApp.btnValidate_Click(Object sender, EventArgs e) in c:\inetpub\ 86
This is the error
Exception: System.UnauthorizedAccessException: Access to the path "C:\Documents and Settings\nnichol1\Desktop\testXSD.xsd" is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReader.CreateScanner() at System.Xml.XmlTextReader.Init() at System.Xml.XmlTextReader.Read() at System.Xml.XmlValidatingReader.ReadWithCollectTextToken() at System.Xml.XmlValidatingReader.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Project1.xmlApp.btnValidate_Click(Object sender, EventArgs e) in c:\inetpub\ 86