By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,995 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,995 IT Pros & Developers. It's quick & easy.

Getting current host name and port in ASP.NET Application

P: n/a
In Silverlight Application it's possible to query current Application's
hostname and port using namespace Windows.System and code like
below. Iused it in WCF client call.

String hostname = Application.Current.Host.Source.Host + ":" +
Application.Current.Host.Source.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 Application?

Cheers,

JQ
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.