I have a MVC application; in deve开发者_运维技巧lopment machine the debug path goes something like localhost:.
I can check that url of the request my server have is localhost or application hosted on server means they are online.
How can I find out that my application is on development machine?
HttpRequest.IsLocal
Check Request.Url.Hostname and Request.Url.Port.
This will tell you the URL that the user requested.
Alternatively, check Environment.MachineName.
加载中,请稍侯......
精彩评论