I have a file that is in a the mapped folder "Layouts" in my Visual Studio project. I would like to read the contents of this file but I have been having some trouble accessing it. What I have tried:
SPWeb web = SPContext.Current.Web; XmlTextReader reader = new XmlTextReader(web.Url + "/_layouts/MyPoject/data.xml"); reader.Read();
But when i get to the
reader.Read(); link it throws a 404 error. Is there a different way that I should be accessing this file?