By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,440 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,440 IT Pros & Developers. It's quick & easy.

error: "...is a physical path"

P: n/a
Hi,

I'm trying to reach an xml file from within a web application. The file is
physically on a different server. When I try to reach it using
\\servername\path\ style, I get the error "\\servername\path\ is a physical
path". Using a virtual directory gives the same result.

All I really do is the following:

// XmlTransformer is a System.Web.UI.WebControls.Xml object
XmlTransformer.DocumentSource=this.MapPath("\\serv ername\path\filename.xml")
;

Does anybody have an idea how this can be solved? Thanks in advance!

Michiel.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Not sure what "this" is supposed to be, but the HttpUtility.MapPath() method
expects a URL, and you're passing a physical path to it. Since the method
returns a physical path, you can go ahead and use the physical (network)
path without doing any transformation.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Michiel Schaeverbeke" <mi******************@seco-m.be> wrote in message
news:OD**************@TK2MSFTNGP12.phx.gbl...
Hi,

I'm trying to reach an xml file from within a web application. The file is physically on a different server. When I try to reach it using
\\servername\path\ style, I get the error "\\servername\path\ is a physical path". Using a virtual directory gives the same result.

All I really do is the following:

// XmlTransformer is a System.Web.UI.WebControls.Xml object
XmlTransformer.DocumentSource=this.MapPath("\\serv ername\path\filename.xml") ;

Does anybody have an idea how this can be solved? Thanks in advance!

Michiel.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.