[Mono-list] XSP, GetFilePath

Gonzalo Paniagua Javier gonzalo@ximian.com
13 Jan 2003 23:06:33 +0100


El lun, 13-01-2003 a las 18:31, Daniel Lopez escribió:
> Hi,
> 
> >From the Microsoft documentation
> 
> "When overridden in a derived class, returns the physical path to the
> requested URI."
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebhttpworkerrequestclassgetfilepathtopic.asp

> However, the current MonoWorkerRequest implementation returns the virtual path (that is, it is
> returning the same as GetUriPath() )
> 
> I think the correct behavior should be to return 
> 
> The application base directory appHost.Path + GetUriPath()
> 
> but I am posting it here in case I am missing/misreading something.
> Coments?

The documentation is wrong. It says "physical path", but i tried
'Request.FilePath' in a Page_Load (this one calls the GetFilePath on the
request, you can see it using xsp server with MS runtime and activating
the trace) and it returned "/Gonzalo/button.aspx". Also, Request.Path
returns the same result (this one calls GetUriPath).

To get the physical path, MonoWorkerRequest provides you with
GetFilePathTranslated ().

-Gonzalo