I'm trying to debug a problem which shows up under IIS7 using an application pool configured for .NET 4. My Visual Studio ASP.NET Development Server says it is using 2.0.50727.5456.
我正在尝试使用为.NET 4配置的应用程序池来调试IIS7下显示的问题。我的Visual Studio ASP.NET开发服务器说它使用的是2.0.50727.5456。
I'd like to debug this out of VS so I'd like the .NET versions to match. I've found info on setting ports but there was no version setting nearby. And I couldn't find anything under the the Website.ASP Configuration menu item in VS either.
我想从VS调试这个,所以我想要.NET版本匹配。我找到了有关设置端口的信息,但附近没有版本设置。我在VS中的Website.ASP配置菜单项下找不到任何内容。
Is there any way to configure the ASP.NET Development Server's .NET version?
有没有办法配置ASP.NET Development Server的.NET版本?
2 个解决方案
#1
3
Check the targetFramework
attribute of your compilation element in your web.config
. If it's missing, add the attribute, and try setting it to 4.0
.
检查web.config中编译元素的targetFramework属性。如果缺少,请添加属性,然后尝试将其设置为4.0。
If you're using a web application project (not a web site), try checking the project settings and look for Target Framework.
如果您正在使用Web应用程序项目(而不是Web站点),请尝试检查项目设置并查找Target Framework。
#2
0
A better solution would be to make sure you have installed VS 2010 SP1, then install IIS Express which is a stand-alone version of IIS used for development. This uses the exact same code as is in the full IIS, this way your environment is the same.
更好的解决方案是确保已安装VS 2010 SP1,然后安装IIS Express,这是用于开发的IIS的独立版本。这使用与完整IIS中完全相同的代码,这样您的环境就是一样的。
http://learn.iis.net/page.aspx/868/iis-express-overview/
http://learn.iis.net/page.aspx/868/iis-express-overview/
#1
3
Check the targetFramework
attribute of your compilation element in your web.config
. If it's missing, add the attribute, and try setting it to 4.0
.
检查web.config中编译元素的targetFramework属性。如果缺少,请添加属性,然后尝试将其设置为4.0。
If you're using a web application project (not a web site), try checking the project settings and look for Target Framework.
如果您正在使用Web应用程序项目(而不是Web站点),请尝试检查项目设置并查找Target Framework。
#2
0
A better solution would be to make sure you have installed VS 2010 SP1, then install IIS Express which is a stand-alone version of IIS used for development. This uses the exact same code as is in the full IIS, this way your environment is the same.
更好的解决方案是确保已安装VS 2010 SP1,然后安装IIS Express,这是用于开发的IIS的独立版本。这使用与完整IIS中完全相同的代码,这样您的环境就是一样的。
http://learn.iis.net/page.aspx/868/iis-express-overview/
http://learn.iis.net/page.aspx/868/iis-express-overview/