I want to know if there is a recommended way of determining if an asp application is running locally. At the moment I use the Request object and do a string search for localhost or 127.0.0.1 on the server variable but this has several limitations. The biggest one being that the Request object is not always available when I need it.
Run the command import-module servermanager. ASP.NET 4.5: Run the command get-windowsfeature Net-Framework-45-Core. The output indicates the ASP.NET 4.5 install state ("Installed" or "Available").
The best way to monitor the performance of your ASP.NET application is with an application performance management (APM) solution. Retrace tracks the performance of your application down to the code level and provides detailed reporting of ASP.NET application performance.
See HttpRequest.IsLocal
bool isLocal = HttpContext.Current.Request.IsLocal;
You can check the Request.IsLocal property
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With