I'm curious about options for passing arguments to an MVC app (web app, rest service etc). There seems to be no support for this from what I can find however...
If I modify an app's Application_Start method (in Globals.asax.cs) and add a statement like this:
Environment.GetCommandLineArgs()
then run this under the Visual Studio debugger, I can see that fours args are being passed.
These are:
A path to the iisexpress.exe file.
A path to an applicationhost.config
A "/site" arg.
A "/apppool" arg.
This suggests that there actually is a way to pass arguments but nobody talks about it and its not documented. I'd like to add another custom arg here that our own code can look for and respond to if it's present.