Find out in Global.Asax - Application_Start if ASP.NET application running locally

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-05-21T21:56:04Z Indexed on 2010/05/22 8:50 UTC
Read the original article Hit count: 430

Hello,

HttpContext.Current.Request.IsLocal is not available in Global.Asax/Application_Start (Request is not available in the context).

How else could I safely determine if my ASP.NET MVC application is started locally or not?

This is to rewrite my web.config conditionally (depending on whether the application is deployed (remote) or in testing (local)).

Thank you!

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET