I am using the following code:
DataSet mydata = new DataSet();
mydata.ReadXml("~/App_Data/sdn.xml");
But instead of going to the App_Data directory of my web site (hosted on IIS on my local machine for test purposes), I get the error:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\WINDOWS\system32\~\App_Data\sdn.xml'.
Is there something I am missing If I put the file into a different path and reference the path directly, the program works fine, but I need the service to look into the correct app_data directory to deploy to a remote web server.
.NET Development18
|