tags:

views:

50

answers:

1
http://localhost:6223/RssFeed/RssFeedsLang?lang=Dari&cat=News

How can I get the http://localhost:6223/ of the url? Basically I want to discard /RssFeed/RssFeedsLang?lang=Dari&cat=News in the url. How can I do that?

+2  A: 

Use this:

string urlBase = Request.Url.GetLeftPart( UriPartial.Authority ) + Request.ApplicationPath;
Lorenzo