를 찾을 수 없습니다. 현재 ASP.NET과 XML을 사용하는 프로젝트를 만들고 있습니다. 프로젝트의 경우 Visual Studio에서 새 웹 사이트를 만들고 App_Data에 XML 파일을 보관하려고합니다. 내가 코드를 사용하려고 할 때내가 심지어 을 그 질문을 좀 바보가 된 기분하지만 난이 문제를 해결하는 방법을 알아 내려고 시간처럼 앉아있는 XML 경로 오류
그러나 :
var topic = from t in XElement.Load("App_Data/topics.xml").Elements("topics")
select new
{
topic_id = t.Attribute("id"),
topic_subject = t.Element("topicname"),
topic_short_body = t.Element("topicshortbody")
};
을 나는 오류가 점점 오전 :
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\App_Data\topics.xml'.
Source Error:
Line 23: {
Line 24:
Line 25: var topic = from t in XElement.Load("App_Data/topics.xml").Elements("topics")
Line 26: select new
Line 27: {
Source File: d:\college\xml\xmlproject\Default.aspx.cs Line: 25
내가 App_Data 내 파일이 절대적으로 확신합니다. 내 질문에 경로를 지정하는 다른 방법이 있습니까 또는 내 경우 적절한 경로를 지정하는 방법을 것입니다?
미리 감사드립니다.