« Is directory access allowed | Main | Help file link in ASP.NET »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c6cc353ef00d8356a6abb69e2

Listed below are links to weblogs that reference base url in an ASP.NET app:

Comments

Chris M

Or Request.Url.GetLeftPart(UriPartial.Authority).

John

httpcontext.current

this is available everywhere since its static itself

Jordan

Ok, now how do you do that when you don't have a HttpRequest. Like say in the constructor or a static method. There has to be a way, this is silly.

Tim Wilson

Awesome! Thanks!

proka

useful, 10x

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.