title: host website using IIS 8.5 and windows 8.1
body: <p>I am using .Net framework 4.5 and my OS is Windows 8.1, 64-bit. My IIS is 8.5. I am trying to host my web application but I am unsuccessful. I have tried this from VS 2010 by selecting USE LOCAL IIS WEB SERVER but when I click CREATE VIRTUAL DIRECTORY, these messages came:
  <strong><em>configuring web http //localhost/ForIIS for asp.net 4.0 failed. You must manually configure this site for asp.net 4.0 in order for the site to run correctly. ASP.Net 4.0 has not been registered on the web server. you need to manually configure your web server for asp.net 4.0 in order for your site to run correctly</strong>.</em>
  then next pop-up was:
  <strong><em>The virtual directory was created successfully.</em></strong> 
  But when I go to IIS I can see my application under Default Web Site and when I click browse, in the browser I get this error:
  <strong>HTTP Error 500.19 - Internal Server Error</strong>
  <strong><em>The requested page cannot be accessed because the related configuration data for the page is invalid.</em></strong></p>
  
  <ul>
  <li>Error Code: 0x80070021</li>
  <li>Config Error: This configuration section cannot be used at this path.
  This happens when the section is locked at a parent level. Locking is
  either by default (overrideModeDefault="Deny"), or set explicitly by
  a location tag with overrideMode="Deny" or the legacy
  allowOverride="false".</li>
  <li>Config File:\?\C:\Users\Ansar\Documents\VisualStudio2010\Projects\ForIIS\ForIIS\web.config</li>
  </ul>
  
  <p>Also in my IIS when I click Add Application Pool I get dropdown .NET CLR Versions and its items as
  .NET CLR Versions v4.0.30319, .NET CLR Versions v2.0.50727, No Managed Code. 
  But when I see other system who is having other OS I can see their dropdown as 
  .NET Framework Versions and dropdown items as .NET Framework v4.0.30319 etc.
  I think the problem is because of windows 8.1 or IIS 8.5 whatever but I have Googled many times but I am not able to host my website. I have also run aspnet_regiis from folder C:\Windows\Microsoft.NET\Framework\v4.0.30319. but nothing happened. 
  I have also tried creating virtual directory for my website directly from IIS but I get the same error in browser.</p>