re:
!I tried to find out how to do this in ASP.NET Application but couldn't succeeded.
!Does anyone know how to get same result in ASP.NET Applicatio?
Dim fullappname as string = Request.Url.Hos t
Dim port as string = Request.ServerV ariables("SERVE R_PORT")
Dim MyUrl As Uri = Request.Url
Dim fullappnameProt ocolAndPort As String = "The full URL, protocol and port for the application is : " _
& Server.HtmlEnco de(MyUrl.Scheme ) & "://" & fullappname & ":" & port & Request.Applica tionPath & "/"
That code will also give you the correct protocol.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
=============== =============== ========
"John Q" <jo****@mail.co mwrote in message news:fu******** **@nyytiset.pp. htv.fi...
In Silverlight Application it's possible to query current Application's
hostname and port using namespace Windows.System and code like
below
String hostname = Application.Cur rent.Host.Sourc e.Host + ":" + Application.Cur rent.Host.Sourc e.Port;
I tried to find out how to do this in ASP.NET Application but couldn't succeeded.
Does anyone know how to get same result in ASP.NET Applicatio?
Cheers,
JQ