[thelist] (asp.net 1.1) Application Path weirdness
Tab Alleman
talleman at Lumpsum.com
Fri Jul 6 13:35:44 CDT 2007
Actually the / in front of the ? isn't a typo. I CnP'd it right out of the address bar. That's the part that really has me puzzled...but I tried your suggestion, and now I get:
http:////ClaimantList.aspx?Submit=Search&ClaimantSearch=smi
which is also no good.
So my current code is:
Response.Redirect("http://" & Replace(HttpContext.Current.Request.ServerVariables("HOST_NAME") & "/" & HttpContext.Current.Request.ApplicationPath & "/ClaimantList.aspx?Submit=Search&ClaimantSearch=" & tbSearch.Value.ToString, "//", "/"))
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Anthony Baratta
> Sent: Friday, July 06, 2007 1:56 PM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] (asp.net 1.1) Application Path weirdness
>
>
> I'm assuming the / in front of the ? is a typo.
>
> ApplicationPath is just that, where you have the dotNet
> Application root. One your local PC, that will be
> /somedir/file.ext, because the local IIS service can only
> have one virtual directory and that forces you do work in a
> sub-directory. I'm guessing that your remote server has only
> the ASPX code in it directly and not within a sub-directory -
> hence the lack of a path.
>
> That said, just putting the Application Path will not give
> you the server name. So you should have that too as part of
> your out put:
>
> "http://" &
> HttpContext.Current.Request.ServerVariables("HOST_NAME") & "/"
> HttpContext.Current.Request.ApplicationPath &
> "/ClaimantList.aspx?Submit=Search&ClaimantSearch="
> & tbSearch.Value.ToString
>
> -----Original message-----
> From: "Tab Alleman" talleman at Lumpsum.com
> Date: Fri, 06 Jul 2007 09:18:01 -0700
> To: "Evolt Thelist \(E-mail\)" thelist at lists.evolt.org
> Subject: [thelist] (asp.net 1.1) Application Path weirdness
>
> > I have this line of code:
> >
> >
> Response.Redirect(HttpContext.Current.Request.ApplicationPath
> & "/ClaimantList.aspx?Submit=Search&ClaimantSearch=" &
> tbSearch.Value.ToString)
> >
> >
> > It works fine on my localhost, but when I upload it to a
> webserver and hit it, it attempts to redirect to something like:
> >
> >
> > http://claimantlist.aspx/?Submit=Search&ClaimantSearch=pa
> >
> >
> > Why is it munging the URL like that? It's hard to debug
> when it doesn't happen in debug mode. grrrr...
>
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
More information about the thelist
mailing list