{"id":27,"date":"2013-09-11T13:32:02","date_gmt":"2013-09-11T13:32:02","guid":{"rendered":"http:\/\/passionwind.com\/techref\/?p=27"},"modified":"2013-09-11T13:32:02","modified_gmt":"2013-09-11T13:32:02","slug":"defining-asp-net-4-0-as-application-pool-on-iis-7","status":"publish","type":"post","link":"http:\/\/techref.camellarry.com\/?p=27","title":{"rendered":"Defining ASP.NET 4.0 as Application Pool on IIS 7"},"content":{"rendered":"<p>I was trying to move my local website to to Windows 7. The application must run ASP.NET v4.0 as the application pool within IIS. This is how I was able to get it working.<\/p>\n<ul>\n<li>Open your command prompt (<kbd>Windows<\/kbd>\u00a0+\u00a0<kbd>R<\/kbd>) and type\u00a0<code>cmd<\/code>\u00a0and press\u00a0<kbd>ENTER.<\/kbd>\u00a0 You may need to start this as an administrator if you have UAC enabled. To do so, locate the exe (usually you can start typing with Start Menu open), right click and select &#8220;Run as Administrator&#8221;<\/li>\n<li>Type\u00a0<code>cd C:WindowsMicrosoft.NETFrameworkv4.0.30319<\/code>\u00a0and press\u00a0<kbd>ENTER<\/kbd>.<\/li>\n<li>Type\u00a0<code>aspnet_regiis.exe -ir<\/code>\u00a0and press\u00a0<kbd>ENTER<\/kbd>\u00a0again.\n<ul>\n<li>If this is a fresh version of IIS (no other sites running on it) or you&#8217;re not worried about the hosted sites breaking with a framework change you can use\u00a0<code>-i<\/code>\u00a0instead of\u00a0<code>-ir<\/code>. This will change their AppPools for you and steps 5-on shouldn&#8217;t be necessary.<\/li>\n<li>at this point you will see it begin working on installing .NET&#8217;s framework in to IIS for you<\/li>\n<\/ul>\n<\/li>\n<li>Close the DOS prompt, re-open your start menu and right click\u00a0<strong>Computer<\/strong>\u00a0and select\u00a0<strong>Manage<\/strong><\/li>\n<li>Expand the left-hand side (Services and Applications) and select\u00a0<strong>Internet Information Services<\/strong>\n<ul>\n<li>You&#8217;ll now have a new applet within the content window exclusively for IIS.<\/li>\n<\/ul>\n<\/li>\n<li>Expand out your computer and locate the\u00a0<strong>Application Pools<\/strong>\u00a0node, and select it. (You should now see\u00a0<em>ASP.NET v4.0<\/em>\u00a0listed)<\/li>\n<li>Expand out your\u00a0<strong>Sites<\/strong>\u00a0node and locate the site you want to modify (select it)<\/li>\n<li>To the right you&#8217;ll notice\u00a0<strong>Basic Settings&#8230;<\/strong>\u00a0just below the\u00a0<em>Edit Site<\/em>\u00a0text. Click this, and a new window should appear<\/li>\n<li>Select the .NET 4 AppPool using the\u00a0<kbd>Select...<\/kbd>\u00a0button and click ok.<\/li>\n<li>Restart the site, and you should be good-to-go.<\/li>\n<\/ul>\n<p>(You can repeat steps 7-on for every site you want to apply .NET 4 on as well).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to move my local website to to Windows 7. The application must run ASP.NET v4.0 as the application pool within IIS. This is how I was able to get it working. Open your command prompt (Windows\u00a0+\u00a0R) and type\u00a0cmd\u00a0and press\u00a0ENTER.\u00a0 You may need to start this as an administrator if you have UAC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2,4],"tags":[16,39,74],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-asp-net","category-iis","tag-asp-net","tag-iis","tag-tutorial"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9t3oE-r","_links":{"self":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":1,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":28,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions\/28"}],"wp:attachment":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}