![]() |
UnauthorizedAccessException when reading XML files (no problem when reading other file-types)
Hi NG,
I want to read a xml-file from an asp-page: // Kategorien aus xml laden string pathKategorien = Server.MapPath("./conf/kategorien.xml"); FileStream fs = new FileStream(pathKategorien, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); StreamReader sr = new StreamReader( fs ); XmlSerializer s = new XmlSerializer( typeof( Kategorien ) ); _kat = (Kategorien)s.Deserialize( sr ); I get the Exceptio "UnauthorizedAccessException". But I am sure that the Access rights are properly set, becaus it is no problem to read a text-File from the same folder: string pathKategorien = Server.MapPath("./conf/textfile.txt"); So I suppose there must be something special about XML-file concerning file access rights. Does anyone have a hint for me? Thanx, Bernd |
| All times are GMT. The time now is 05:05 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.