G
Guest
I have an ASP.Net 1.1 site that uses Server.Transfer() heavily. Specifically,
I use a page called /misc/pagenotfound.aspx to implement logic that maps URLs
of the format /vdir/california to a physical page, called with the format
/vdir/state.aspx?id=CA. The first of these URLs can be used to call up the
page by the visitors. Because this page doesn't exist PageNotFound.aspx is
loaded (I have configured this in web.config), which uses Server.Transfer to
invoke the state.aspx page (the physical page on my server). Here's the
important part - the address bar in the browser still displays
/vdir/california so all this plumbing is hidden to the visitor. That's
exactly what I want.
However, now that I am using the same page on an ASP.Net 2.0 site I am
seeing a different behaviour. The state.aspx file is still called and the
correct content (based on id=ca) is displayed. However, the address bar
displays the URL to PageNotFound. aspx - /vdir/california is not displayed.
How can I ensure that the actually URL used by the visitor remains in the
address bar, even when Server.Transfer is used?
Thanks.
I use a page called /misc/pagenotfound.aspx to implement logic that maps URLs
of the format /vdir/california to a physical page, called with the format
/vdir/state.aspx?id=CA. The first of these URLs can be used to call up the
page by the visitors. Because this page doesn't exist PageNotFound.aspx is
loaded (I have configured this in web.config), which uses Server.Transfer to
invoke the state.aspx page (the physical page on my server). Here's the
important part - the address bar in the browser still displays
/vdir/california so all this plumbing is hidden to the visitor. That's
exactly what I want.
However, now that I am using the same page on an ASP.Net 2.0 site I am
seeing a different behaviour. The state.aspx file is still called and the
correct content (based on id=ca) is displayed. However, the address bar
displays the URL to PageNotFound. aspx - /vdir/california is not displayed.
How can I ensure that the actually URL used by the visitor remains in the
address bar, even when Server.Transfer is used?
Thanks.