Get domain name on ASP.NET Application_End events
How can you obtain the 'mydomain.com' par开发者_运维百科t of a url within Application_End?
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 ?
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).
精彩评论