{"id":2814,"date":"2010-12-11T15:05:48","date_gmt":"2010-12-11T15:05:48","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2010\/12\/11\/visual-studio-2010-sp1-beta-iis-express-integration\/"},"modified":"2022-08-16T01:15:35","modified_gmt":"2022-08-16T08:15:35","slug":"visual-studio-2010-sp1-beta-iis-express-integration","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/visual-studio-2010-sp1-beta-iis-express-integration\/","title":{"rendered":"Visual Studio 2010 SP1 Beta IIS Express Integration"},"content":{"rendered":"<p>A few days ago Jason Zander blogged about the availability of Visual Studio SP1 Beta (all links below in resources section). I am happy to let you guys know that with SP1 Beta we have enabled integration of IIS Express into Visual Studio. After you have installed SP1 Beta you have to <a href=\"http:\/\/www.microsoft.com\/web\/gallery\/install.aspx?appid=iisexpress\">download IIS Express<\/a> separately for the option to \u201clight up\u201d. After you\u2019ve downloaded and installed IIS Express you can now create Web projects and Websites which use IIS Express instead of Cassini (the default web server used in Visual Studio). For more information regarding the difference between IIS Express and IIS\/Cassini please see Scott\u2019s blog linked below. Visual Studio 2010 has two types of web projects; Web Application Project (WAP) and Website projects. You can use either project type with IIS Express.<\/p>\n<h2>Enabling IIS Express for web projects<\/h2>\n<p>For both WAP and Website projects which were using Cassini we have a very simply method for you to use IIS Express. You can just right click then select the context menu option \u201cUse IIS Express\u201d. Take a look at the screen shot that follows for that command.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/4336.image_thumb.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/4336.image_thumb.png\" alt=\"image\" width=\"162\" height=\"244\" border=\"0\" \/><\/a><\/p>\n<p>After you do this your project will use IIS Express instead of Cassini going forward. If you wish to revert back to using Cassini you can just right click on the project and select \u201cUse Visual Studio Development Server\u2026\u201d You can also make IIS Express your default web server for new projects as well.<\/p>\n<p>For Web site projects when you create a new site you can create it such that IIS Express hosts it instead of Cassini. From Visual Studio when you select File-&gt;New-&gt; Web Site you will see the New Web Site dialog. On that dialog you can click on the Browse button (see image below).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/8372.SNAGHTML108dba11_thumb.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"SNAGHTML108dba11\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/8372.SNAGHTML108dba11_thumb.png\" alt=\"SNAGHTML108dba11\" width=\"244\" height=\"170\" border=\"0\" \/><\/a><\/p>\n<p>After you click that you will be prompted to enter the location where the site will be located. From there you can select \u201cLocal IIS\u201d and the create a new IIS Express site for it.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/7360.SNAGHTML108f284e_thumb.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"SNAGHTML108f284e\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/7360.SNAGHTML108f284e_thumb.png\" alt=\"SNAGHTML108f284e\" width=\"244\" height=\"214\" border=\"0\" \/><\/a><\/p>\n<p>In this dialog you need to select IIS Express Sites then click on the Create New Site button located towards the upper right hand corner. Once you do this it will create a new IIS Express site for your Web site.<\/p>\n<h2>Making IIS Express your default web server<\/h2>\n<p>In order to make IIS Express for new file based web projects you can go to the menu option Tools-&gt;Options-&gt;Projects and Solutions-&gt;Web Projects and check the \u201cUse IIS Express for new file-based web sites and projects\u201d check box. You can see this option in the next image.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/0028.SNAGHTML10527286_thumb.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"SNAGHTML10527286\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/0028.SNAGHTML10527286_thumb.png\" alt=\"SNAGHTML10527286\" width=\"244\" height=\"143\" border=\"0\" \/><\/a><\/p>\n<p>After you have done this\u00a0 new projects\/sites will use IIS Express by default. Note: if you have any existing projects\/sites you will still have to \u201copt-in\u201d to using IIS Express for each project.<\/p>\n<h2>Using IIS Express<\/h2>\n<p>After you have enabled IIS Express to be your projects web server, when you start debugging, or just start running your app, from Visual Studio you will see a new system tray icon appear (<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/3755.image_thumb_1.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/3755.image_thumb_1.png\" alt=\"image\" width=\"20\" height=\"21\" border=\"0\" \/><\/a>). You can right click on this icon to to quickly see what applications it is hosting. Each hosted application will have its own context menu. From this menu you can browse out to the application as well as stop it quickly.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/5807.image_thumb_2-1.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/5807.image_thumb_2-1.png\" alt=\"image\" width=\"413\" height=\"131\" border=\"0\" \/><\/a><\/p>\n<p>You can also click on \u201cShow All Applications\u201d to open a dialog which give you more information about the sites that IIS Express is hosting. For example I opened this dialog and selected a running application and the result is shown in the image below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/5633.SNAGHTML105b4a00_thumb.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"SNAGHTML105b4a00\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/5633.SNAGHTML105b4a00_thumb.png\" alt=\"SNAGHTML105b4a00\" width=\"761\" height=\"374\" border=\"0\" \/><\/a><\/p>\n<p>There are a few notable values here<\/p>\n<ul>\n<li>The URL for each hosted application<\/li>\n<li>The Runtime version for the application<\/li>\n<li>The path to the application<\/li>\n<li>The path to the applicationHost.config file<\/li>\n<\/ul>\n<p>The default location for the applicationHost.config file is your users\u2019 directory. This enables IIS Express to run without requiring admin privileges. As you may know IIS (i.e. the full IIS) uses the applicationHost.config file to store its configuration. IIS Express is similar to IIS in that it uses a file also named applicationHost.config (not the same file as IIS though). The file that IIS uses is stored under the System32 directory and is shared across all users. The IIS Express config is specific to the current user. Regarding the runtime version, this is the version of the CLR which your application pool will use. For IIS Express application pools will, by default, use CLR 4.0. You can change this default in the applicationHost.config file for IIS Express. Visual Studio will assign the correct CLR version to your app pool based on the target framework version.<\/p>\n<p>You can customize a few options for your site directly from Visual Studio. If you select your web project\/site in the Solution Explorer and then open the Properties pane (you can right-click and select Properties on the project\/site if it is not visible) you should see something similar to the following.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/2502.image_thumb_3.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/2502.image_thumb_3.png\" alt=\"image\" width=\"368\" height=\"261\" border=\"0\" \/><\/a><\/p>\n<p>These settings will change how IIS Express hosts your site. One of the missing features of Cassini was the ability to host SSL sites. In IIS Express you can enable this. For example for this site I changed the value for SSL Enabled to be True, then a new URL was assigned so that I can use SSL to browse to the site. Please note that IIS Express will install a self-signed cert and you will see the following security warning from Internet Explorer when you browse to an https URL hosted by IIS Express.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/5314.image_thumb_4.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2010\/12\/5314.image_thumb_4.png\" alt=\"image\" width=\"244\" height=\"116\" border=\"0\" \/><\/a><\/p>\n<p>One thing to make a note of is that when you change the settings for IIS Express here these settings are stored in the applicationHost.config file for IIS Express and not with the project\/site itself. So if you are working in a team then your other team members will have to make the same changes. If you want to edit a setting which is not shown on the properties grid then you can edit the applicationHost.config file directly. You can easily open this file by clicking on the applicationHost.config link in the IIS Express dialog shown previously. For WAP projects you can change the port that is used from the Web tab in the project properties page.<\/p>\n<h2>Known issues<\/h2>\n<p>There are currently some known issues with IIS Express which are listed below. If you run into any more please let us know.<\/p>\n<ul>\n<li>Profiling is not supported<\/li>\n<li>If you add a Web Deployment Project (WDP) to an IIS Express web site you will have to remove the \u2018:\u2019 from the name of the WDP<\/li>\n<li>Some issues using WDP for IIS Express sites with sub-webs<\/li>\n<\/ul>\n<h2><\/h2>\n<h2>Resources<\/h2>\n<ul>\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=207130\">Visual Studio SP1 Beta download<\/a><\/li>\n<li><a href=\"http:\/\/www.microsoft.com\/web\/gallery\/install.aspx?appid=iisexpress\">IIS Express Download<\/a><\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/jasonz\/archive\/2010\/12\/07\/announcing-visual-studio-2010-service-pack-1-beta.aspx\">Jason Zander\u2019s blog announcing SP1 Beta<\/a><\/li>\n<li><a href=\"http:\/\/weblogs.asp.net\/scottgu\/archive\/2010\/06\/28\/introducing-iis-express.aspx\">Scott Guthrie\u2019s blog on IIS Express<\/a><\/li>\n<li><a href=\"http:\/\/learn.iis.net\/page.aspx\/124\/introduction-to-applicationhostconfig\/\">Introduction to applicationHost.config<\/a><\/li>\n<li><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=89f2c4f5-5d3a-49b6-bcad-f776c6edfa63&amp;displaylang=en\">Web Deployment Projects &#8211; 2010<\/a><\/li>\n<\/ul>\n<p>Cross posted to: <a href=\"http:\/\/sedodream.com\/2010\/12\/11\/VisualStudio2010SP1BetaIISExpressIntegration.aspx\">http:\/\/sedodream.com\/2010\/12\/11\/VisualStudio2010SP1BetaIISExpressIntegration.aspx<\/a><\/p>\n<p>Sayed Ibrahim Hashimi <a href=\"https:\/\/twitter.com\/\/sayedihashimi\">@sayedihashimi<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago Jason Zander blogged about the availability of Visual Studio SP1 Beta (all links below in resources section). I am happy to let you guys know that with SP1 Beta we have enabled integration of IIS Express into Visual Studio. After you have installed SP1 Beta you have to download IIS Express [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7299,7379,7371,7323,7319],"class_list":["post-2814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-iis","tag-iis-express","tag-sayed-ibrahim-hashimi","tag-visual-studio-2010","tag-visual-web-developer"],"acf":[],"blog_post_summary":"<p>A few days ago Jason Zander blogged about the availability of Visual Studio SP1 Beta (all links below in resources section). I am happy to let you guys know that with SP1 Beta we have enabled integration of IIS Express into Visual Studio. After you have installed SP1 Beta you have to download IIS Express [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=2814"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2814\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=2814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=2814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=2814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}