Is there any directive in C# that runs a code (server side code) only when the application runs on localhost and ignores it on production (not the debug true or false)?
It can be something that reads a web.config appsettings variable, if it’s true, run the code, if it’s false, ignore it (just an idea).
1 Answer