检测开发服务器在asp.net(Visual Studio中) [英] Detect development server in asp.net (Visual Studio)

查看:165
本文介绍了检测开发服务器在asp.net(Visual Studio中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能编程,如果在Visual Studio开发服务器是用来代替IIS检测?

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

推荐答案

在Visual Studio 2010中,Request.ServerVariables(SERVER_SOFTWARE)将返回用于开发服务器没有(空),以及微软-IIS / 7.5的我的Win7专业版IIS / VS2010安装。

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.

这篇关于检测开发服务器在asp.net(Visual Studio中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆