tags:

views:

24

answers:

2

How can you obtain the 'mydomain.com' part of a url within Application_End?

+1  A: 

There is not url to get because there is no user that read a page on application_end.

Think some other way to find it - but why you search it for ? it is change ? don't you know it ? Do you have think to place it on a variable on web.config if have an application that you run it on different domains ?

What about the application path ?

Aristos
+1 for the suggestions, but I need the domain name as it is unique but the path is not unique. Thanks
Moderator71
A: 

I found the answer to my question. I had store the URL in a Shared Property. Shared instance properties are available within the Application_End event.

The application path will not suffice as I need a unqiue URI to determine which environment the application is running in (i.e. Development, Staging, Production, etc).

Moderator71