N
.NETed
I am experiencing a strange problem. In my page I do the following:
public string Transform(string xmlfile, string xsltfile)
{
if (xmlfile != null && xsltfile != null)
{
XPathDocument xpathdoc = new XPathDocument(xmlfile);
:
}
}
other code has been left out. I always get a "WebException was unhandled by
user code" and the message of the web exception is "The remote server
returned an error: (503) Server Unavailable."
I am not retrieving the file (XSL or XML) from any remote server, in fact
the file is local. When I debug I see the exception is thrown during the
instantiation of XPathDocument where the xmlfile parameter value is
"D:\Websites\MySite\backend\xmlsource.htm" (I changed the name for the
purpose of this post).
The path and file in the value of the variable DOES exist. So why am I
getting a WebException? The file is simply an HTML snippet (not a whole HTML
document) without any weird or foreign characters (only ASCII characters).
Any ideas what is wrong there?
public string Transform(string xmlfile, string xsltfile)
{
if (xmlfile != null && xsltfile != null)
{
XPathDocument xpathdoc = new XPathDocument(xmlfile);
:
}
}
other code has been left out. I always get a "WebException was unhandled by
user code" and the message of the web exception is "The remote server
returned an error: (503) Server Unavailable."
I am not retrieving the file (XSL or XML) from any remote server, in fact
the file is local. When I debug I see the exception is thrown during the
instantiation of XPathDocument where the xmlfile parameter value is
"D:\Websites\MySite\backend\xmlsource.htm" (I changed the name for the
purpose of this post).
The path and file in the value of the variable DOES exist. So why am I
getting a WebException? The file is simply an HTML snippet (not a whole HTML
document) without any weird or foreign characters (only ASCII characters).
Any ideas what is wrong there?