The ASPNETCoreModule which is required to host .NET Core projects in IIS does not appear to be installed
Solution 1
I got this error in Visual Studio 2019 and my solution was to run the VS installer and verify that the ASP.NET workload was installed. In my case it was not, simply installing it resolved the issue.
Exact steps to take if you want to follow my solution:
- Open VS installer
- Click MODIFY on the SKU of VS you were trying to use when you got the error (in my case the Preview version of VS enterprise)
- In the list of workloads make sure ASP.NET is checked, if not check it and click install
Solution 2
This happened for me with an update to VS 2019. What I did was:
- Open Visual Studio Installer.
- Click Modify
- Click "Development time IIS support" under ".NET cross-platform development"
- Click Modify
This fixed the issue for me.
Solution 3
What worked for me is installing .NET Core hosting bundle from here:
Update:
Last available version can be found here
Just install it and start your project using IIS.
Solution 4
check IIS Express
on Vs2017 installer
Solution 5
Since it's unclear if you are trying to host them in IIS or not (this message should only appear when you try to host it on IIS)... a shoot into the blue.
The ASPNetCoreModule isn't installed by default iirc, not even with VS2015/2017 tools. You can download and install them from the official .NET Core download page here.
You need the "Windows Server Hosting (x64 & x86)".
StepUp
Love learning, coding and do new tries. Open to know new knowledge:). Like developing software. Are you looking for a typical code sample? Please download all in one code framework ! It is really cool to find new knowledges and share with you!:) Explore the .NET Framework source code online!:) Bandy lover!:)
Updated on July 19, 2022Comments
-
StepUp almost 2 years
I've just installed
Visual Studio 2015
and have just created newASP.NET Core Web Application
project. When I run theASP.NET Core Web application
project I've met the following exception(I am just hittingCtrl+F5
to run the project in Visual Studio 2015):The ASPNETCoreModule which is required to host .NET Core projects in IIS does not appear to be installed. Try repairing Visual Studio to correct the problem.
If I run other types of projects such as
ASP.NET MVC
orASP.NET Web API
, then they run perfectly.The following SDK is already installed:
My
project.json
file:{ "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.1", "type": "platform" }, "Microsoft.ApplicationInsights.AspNetCore": "1.0.0", "Microsoft.AspNetCore.Diagnostics": "1.0.0", "Microsoft.AspNetCore.Mvc": "1.0.1", "Microsoft.AspNetCore.Razor.Tools": { "version": "1.0.0-preview2-final", "type": "build" }, "Microsoft.AspNetCore.Routing": "1.0.1", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", "Microsoft.AspNetCore.StaticFiles": "1.0.0", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", "Microsoft.Extensions.Configuration.Json": "1.0.0", "Microsoft.Extensions.Logging": "1.0.0", "Microsoft.Extensions.Logging.Console": "1.0.0", "Microsoft.Extensions.Logging.Debug": "1.0.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0" }, "tools": { "BundlerMinifier.Core": "2.0.238", "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } },
What I've tried to do:
-
I have varied
version
attribute to1.0.0-preview2-final
,1.0.1
,1.0.3
:"Microsoft.NETCore.App": { "version": "1.0.3",//1. "type": "platform" },
I have installed
DotNetCore.1.0.4_1.1.1-WindowsHosting
:
- I have repaired Visual Studio 2015 Professional twice.
Does anybody know what I should do to fix the problem? Any help would be greatly apreciated
-
Tseng about 7 yearsYou trying to run it in IIS?
-
StepUp about 7 years@Tseng I am just hitting Ctrl+F5 to run the project
-
Tseng about 7 yearsAnd you are really using ASP.NET Core 1.0 and not 1.1 (see dependency section of project.json)?
Microsoft.NETCore.App
is a meta package for most runtime related libraries (usually most commonSystem.*
assemblies) and tells which version of the runtime to use. If you use ASP.NET Core 1.1 you also need a .NET Core 1.1.x runtime (1.1.0 or 1.1.1 iirc) -
StepUp about 7 yearsI've attached my
package.json
file to the question to avoid misunderstandings. Thanks in advance. -
Dnyaneshwar Suryawanshi almost 4 yearsSame issue I got and made simple changes in my Project. 1]Go to Project properties and click on debug tab. 2]Now select IIS from Launch and save 3]Build the project and run.
-
-
StepUp about 7 yearsI am not hosting my application at IIS, what I do is I am trying to run the ASP.NET Core project locally at my PC from Visual Studio 2015.
-
StepUp about 7 yearsPlease, see my question again, I've attached an image about what SDK are installed. Shoud I install "Windows Server Hosting (x64 & x86)"?
-
StepUp about 7 yearsPlease, see my question again, I've attached an image about what SDK are installed. Shoud I install "Windows Server Hosting (x64 & x86)"?
-
Alexandre Nourissier about 7 yearsIt can't hurt to try. I'm sure I had this message before and it was a version mismatch between the project structure (xproj, project.json or csproj) and the tooling I had. By default it will take the latest tooling.
-
StepUp about 7 yearsSo I need to change version from
"version": "1.0.0-preview2-003131"
to"version": "1.0.3-preview2-003131"
? -
Alexandre Nourissier about 7 yearsGo here "C:\Program Files\dotnet\sdk" on your disk to see the versions you have
-
StepUp about 7 yearsI've installed this package (
.NET Core 1.1.1 runtime (Current)
). However, there is still the same error. May be another suggestions? -
Tseng about 7 yearsThe error message is not about the runtime, it's about the IIS module. ASPNETCoreModule is a specialized fork of HttpPlattformHandler (an IIS Module for Http Listener and proxy requests). This is not part of the runtime. It should normally be installed with a) .NET Tools for Visual Studio 2015 (or with VS2017 installer since .NET is built-in) or via the ""Windows Server Hosting (x64 & x86)" download on the .NET Core download page, not ".NET Core 1.1.1 runtime (Current)"
-
Tseng about 7 yearsNormally "Windows Server Hosting (x64 & x86)" is for Server usage, where you only install runtime + the module, w/o the VS2015 tools (you typically don't have VS2017 running on your webserver :P)
-
StepUp about 7 yearsI've already installed the following software
DotNetCore.1.0.4_1.1.1-WindowsHosting
, however I still get the same errorThe ASPNETCoreModule which is required to host .NET Core projects in IIS does not appear to be installed. Try repairing Visual Studio to correct the problem.
In addition, I've tried to repair my Visual Studio 2015. Please, may be you have another suggestions? -
Tseng about 7 yearsNot really... Switch to VS2017. It installs and updates faster and will be the only one which support future versions of the dotnet tools/build pipeline. The old project.json related tools won't be updated anymore, they are deprecated. So it's unavoidable to switch to vs2017 at some point
-
StepUp about 7 yearsplease, see my question again. I've attached the image about what I've installed that you gave me advice. Is it correct?
-
StepUp about 7 yearsI've changed this parameter. Nothing happened. I still get the same error.
-
StepUp about 7 yearsLet us continue this discussion in chat.
-
Alexandre Nourissier about 7 yearsThen I guess this is a dead end, maybe the ASPNetCoreModule is actually missing. Don't forget to post your solution once you solved it.
-
Demodave over 2 yearsCan you give more details? What is SKU and where is the list of workloads?