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
Post a Comment