6

Can you programatically detect if the Development server in Visual Studio is used instead of IIS?

ciscoheat
  • 3,719
  • 1
  • 35
  • 52
  • 3
    Is there a specific reason to do so? If you are merely trying to separate out environments, perhaps compilation flags would be better (i.e. DEBUG etc) – rifferte Jan 04 '11 at 19:11

1 Answers1

7

In Visual Studio 2010, Request.ServerVariables("SERVER_SOFTWARE") will return Nothing (null) for the Development Server, and "Microsoft-IIS/7.5" for my Win7 Pro IIS/VS2010 installation.

Andrew Koransky
  • 176
  • 1
  • 7