aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

How to register ASpnetcoremodule in IIS after dotnetcore installation ?

Open vitek-karas opened this issue 7 years ago • 4 comments

From @xBorus on February 18, 2019 15:9

Steps to reproduce

  1. Have a windows server without IIS installed
  2. Install dotnet-hosting-2.2.1
  3. 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

vitek-karas avatar Feb 19 '19 09:02 vitek-karas

  1. Enable IIS.
  2. Repair the hosting bundle.

muratg avatar Feb 27 '19 19:02 muratg

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

xBorus avatar Mar 05 '19 17:03 xBorus

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,

jkotalik avatar Mar 05 '19 17:03 jkotalik

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

xBorus avatar Mar 06 '19 09:03 xBorus