How to register ASpnetcoremodule in IIS after dotnetcore installation ?
From @xBorus on February 18, 2019 15:9
Steps to reproduce
- Have a windows server without IIS installed
- Install dotnet-hosting-2.2.1
- Install IIS via windows features
Expected behavior
In .NET framework we had aspnet_regiis utility. I would expect an utility to register aspnetcore after iis is installed
Actual behavior
In order to get the plugin, one need to :
- Install IIS via windows features
- Reinstall dotnet core
Copied from original issue: dotnet/core-setup#5199
- Enable IIS.
- Repair the hosting bundle.
This could work has a manual workaround, but i need a scripted solution.
@muratg can you provide me a way to script "Repair the current installed dotnet core bundle ?" I can think about something ugly like below but i am not satisfyied
& @(Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName} | Where-Object { $_.DisplayName.Contains("Microsoft .NET Core 2.")})[0].BundleCachePath /repair /quiet
If you keep the hosting bundle exe, it would be easier to just run /uninstall and /repair on that. Otherwise I don't have a much better suggestion. Again, if you are scripting this, the recommendation is to enable IIS first then run the hosting bundle,
I wish i could do that, however i am building a setup that has DotnetCore 2.x as prerequisite. I dont know which version the user has installed nor if they have still kept the installer