c# - .net Determine at run time whether my app is an exe or a web app -


I'm sure I did it before, but I'm in the docks for a while and to find it again It does not seem to be able to determine when I run into my business domain, in which context my application is running. So I can do some switching with config files and use the appropriate method to determine whether I am running in debug or release etc. I believed it was in the system. Environment, but I have not come across it yet.

very easy way:

  bool isWebApp = HttpContext.Current! = Null;  

Every time it works like a charm.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -