[Mono-dev] [Mono-patches] r68496 - intrunk/mcs/class/System.Web:System.Web.UI Test/System.Web.UI

Igor Zelmanovich igorz at mainsoft.com
Wed Nov 29 04:58:22 EST 2006


I have tested Control.OpenFile. (Look at attached)

It calls VirtualPathProvider.GetFile with application relative path.

I think your implementation of DefaultVirtualPathProvider is correct,
just small thing is missing:

UrlUtils.IsRelativeUrl method resolves path such "~/My.aspx" as relative
that causes Exception, but it can by resolved by


-----Original Message-----
From: Gonzalo Paniagua Javier [mailto:gonzalo at novell.com] 
Sent: Tuesday, November 28, 2006 6:22 PM
To: Igor Zelmanovich
Cc: Mono Development
Subject: RE: [Mono-patches] r68496 -
intrunk/mcs/class/System.Web:System.Web.UI Test/System.Web.UI

On Tue, 2006-11-28 at 04:31 -0800, Igor Zelmanovich wrote:
> Gonzalo,
> OpenFile may be implemented this way:
> protected internal Stream OpenFile (string path)
> {
> 	return System.Web.Hosting.VirtualPathProvider.OpenFile (path);
> }
> In this case the corresponding test fails because
> DefaultVirtualPathProvider.GetFile not supports application relative
> path (such as "~/MyPage.aspx").

That means that there's something else to Control.OpenFile, not that
using the virtual path provider in OpenFile is wrong (easy to test, just
add your own virtualpathprovider and call Control.OpenFile with a few
different values. You can also see it in the stacktraces from MS
runtime). Also it is documented to work on physical and virtual paths,
which will be a problem on linux as there's no way of saying that a
given path is physical or virtual without checking for the file to


-------------- next part --------------
A non-text attachment was scrubbed...
Name: VirtualPathProvider.patch
Type: application/octet-stream
Size: 1781 bytes
Desc: VirtualPathProvider.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061129/e4204c27/attachment.obj 

More information about the Mono-devel-list mailing list