Enable ASP.NET 4.5 On Windows 10 or Windows 8/8.1

By default IIS and ASP.NET aren’t configured as part of a Windows setup (for obvious reasons) so developers are used to having to register IIS manually before being able to run and develop ASP.NET web sites on their desktops.  Prior to Windows 8 it was a simple command like this:

aspnet_regiis -r

This no longer works and requires a different command. Depending on what you already have enabled this may work:

dism /online /enable-feature /featurename:IIS-ASPNET45

If you haven’t enabled anything related to IIS yet you can do that at the same time with:

dism /online /enable-feature /all /featurename:IIS-ASPNET45

However!  That might not appear to solve the problem even when it has!  A post from Microsoft makes a bug apparent:

After the installation of the Microsoft .NET Framework 4.6, users may experience the following dialog box displayed in Microsoft Visual Studio when either creating new Web Site or Windows Azure project or when opening existing projects.

Configuring Web http://localhost:64886/ for ASP.NET 4.5 failed. You must manually configure this site for ASP.NET 4.5 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.

NOTE: Microsoft .NET Framework 4.6 may also be referred to as Microsoft .NET Framework 4.5.3

This issue may impact the following Microsoft Visual Studio versions: Visual Studio 2013, Visual Studio 2012, Visual Studio 2010 SP1


Select “OK” when the dialog is presented. This dialog box is benign and there will be no impact to the project once the dialog box is cleared. This dialog will continue to be displayed when Web Site Project or Windows Azure Projects are created or opened until the fix has been installed on the machine.


Microsoft has published a fix for all impacted versions of Microsoft Visual Studio.

Visual Studio 2013 –

Visual Studio 2012

  • An update to address this issue for Microsoft Visual Studio 2012 has been published: KB3002339
  • To install this update directly from the Microsoft Download Center, here

Visual Studio 2010 SP1

  • An update to address this issue for Microsoft Visual Studio 2010 SP1 has been published: KB3002340
  • This update is available from Windows Update
    • To install this update directly from the Microsoft Download Center, here


  1. Germán · May 23, 2016 Reply

    I had to put dism /online /enable-feature /all /featurename:IIS-ASPNET45
    (added /all) but it worked then! thank you much.

  2. Robson Garcia · June 20, 2016 Reply


  3. Daniel · January 23, 2017 Reply

    Yep! it worked for me as well. Also had to use the /all option.
    Thanks a lot 🙂

  4. abdulfattah odusanya · August 16, 2017 Reply

    did not work returned Error: 740

    Elevated permissions are required to run DISM.
    Use an elevated command prompt to complete these tasks.
    in vs2015 developer command prompt

  5. Daniel Oor · September 27, 2017 Reply

    Great post!
    Solved my problem (using Umbraco) as well.

  6. David · November 15, 2017 Reply

    Does not work for me, always get 404.3 error. Have reinstalled IIS 10, made sure all asp.net aspects configured. Cannot get .asp pages to load as localhost. Can run .htm, .php etc. Have spend days on this – must be possible to host .asp website on windows 10 for development.

    • jammer · November 17, 2017 Reply

      Well this process has worked for every machine I have had to perform web development on and also for everyone else so I would say that the registration of IIS is not your issue.

      .asp is VERY VERY old, I’m not sure .asp is still listed as a standard MIME type on IIS 10 … worth checking.

  7. enolenol · January 12, 2018 Reply

    Thank you! This also worked in Windows Server 2016. I am running VS2012.

  8. sturgel · October 24, 2019 Reply

    I am currently having an issue like this. My issue is that Visual Studio 2013 is using my [asset#].[domain].[country] as my “localhost” setting. I have to somehow correct Visual Studio to select “localhost” as localhost instead of my asset#. This was caused by VS installed before IIS.

    Anybody know if this solution will fix for this issue??


    • jammer · March 4, 2020 Reply

      That is an odd situation. I don’t have any information on that as I’ve never seen that particular issue. Sorry.

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.