Request.Url.GetLeftPart(UriPartial.Authority) - strange results
- From: "TimW" <twsw@xxxxxxxxxxx>
- Date: Tue, 19 Aug 2008 12:25:20 -0400
I'm having a problem on an ASP.NET 1.1 web site. The page where I'm having
a problem is accessed without SSL. It contains a link to another page which
can be configured to require SSL. If SSL is required, I change the URL of
the link from a relative URL to an absolute URL with HTTPS something like
this:
string newUrl =
Request.Url.GetLeftPart(UriPartial.Authority).Replace("http://","https://")
+ Response.ApplyAppPathModifier("/MyApp/Secure/MyPage2.aspx");
The GetLeftPart(UriPartial.Authority) is returning a completely different
domain name from the domain in the request:
The Request address is like http://www.MyCompany.org/MyApp/Page1.aspx.
The GetLeftPart expression is returning something like:
https://www.MyCompanysOtherSite.org/MyApp/Secure/Page2.aspx.
If I enabling Trace for the www.MyCompany.org site, the trace information
says the server variable SERVER_NAME is www.MyCompanysOtherSite.org . There
is no reference in the application whatsoever to MyCompaniesOtherSite.org.
So it appears to me that there's something incorrect in the setup of the
MyCompany.org site, but this is beyond my expertise to explain or fix.
How does GetLeftPart(UriPartial.Authority) work, is it the wrong concept
here, what's happening?
Tim W.
.
- Prev by Date: ClickOnce Opens Browser- Fails to Install
- Next by Date: Windows picture and fax viewer, BMP file open issue
- Previous by thread: ClickOnce Opens Browser- Fails to Install
- Next by thread: Windows picture and fax viewer, BMP file open issue
- Index(es):
Relevant Pages
|