asp.net - XDocument: Could not find file 'C:\Program Files (x86)\IIS Express\myfile -


here's code

dim doc = xdocument.load("web.sitemap") 

i'm trying load xml file can manipulate it. i'm getting error saying file cannot found in iis express directory. file located in root directory of project.

i've changed copy output directory property copy always, i'm still getting same error. there reason?

thanks helping

i'm getting error saying file cannot found in iis express directory.

yes, because you're loading relative path name, means "relative current working directory"... in case iis.

you either embed data within assembly, or use httpserverutility.mappath map relative path 1 within directory containing web site.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -