Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WindowsServer 2022] https://aka.ms/dotnetcore-6-0-windowshosting fails to register AspNetCoreModuleV2 under IIS #47791

Open
tomasmsft opened this issue Apr 18, 2023 · 13 comments
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework bug This issue describes a behavior which is not expected - a bug. External This is an issue in a component not contained in this repository. It is open for tracking purposes. feature-installers Includes: Installers
Milestone

Comments

@tomasmsft
Copy link

Prerq:

  • Crete Windows Server 2022 VM (/MicrosoftWindowsServer/WindowsServer/2022-Datacenter/latest")
  • add IIS role and restart (net stop was /y; net start w3svc)
  • install windows-vcredist-x64, windows-vcredist-x86

Install Dotnethosting:

Expected:

c:\Windows\system32\inetsrv\appcmd.exe list module
should list MODULE "AspNetCoreModuleV2" ( native, preCondition: )
however its missing, also no log files %Temp%\dd_ddAspNetCoreModuleV2.log present

Workaround, rerun installer with /repair option
dotnet-hosting-6.0.*-win.exe /q /norestart /repair
restart IIS (net stop was /y; net start w3svc)

c:\Windows\system32\inetsrv\appcmd.exe list module"
MODULE "AspNetCoreModuleV2" ( native, preCondition: )
AspNetCoreModuleV2 is deployed
and logs %Temp%\dd_ddAspNetCoreModuleV2.log are present

@marcpopMSFT marcpopMSFT transferred this issue from dotnet/installer Apr 19, 2023
@adityamandaleeka adityamandaleeka added feature-installers Includes: Installers area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework and removed area-runtime labels Apr 19, 2023
@adityamandaleeka
Copy link
Member

@wtgodbe This maybe looks like something we've seen before?

@wtgodbe
Copy link
Member

wtgodbe commented Apr 19, 2023

Could you share logs from the first install of the hosting bundle? They should be in %temp% after the install. CC @joeloff in case this looks like something you've seen before

@joeloff
Copy link
Member

joeloff commented Apr 19, 2023

There are a number of features that need to be enabled before the hosting bundle installs ANCM. On the main screen of the install it would show a warning message if ANCM is going to be skipped. The logs should have similar information.

@tomasmsft
Copy link
Author

Adding logs from 1st attempt, and 2nd with repair option.
2nd-repair.zip
1st-attempt.zip

What needs to be installed on the machine apart from IIS to get dotnethosting added during first attempt, could you please share required features?

@wtgodbe
Copy link
Member

wtgodbe commented Apr 20, 2023

We can't download arbitrary zip files from a git issue for security reasons, could you host them as a github gist?

@tomasmsft
Copy link
Author

alright, here are logs https://gist.github.com/tomasmsft/0caed92a5f89bbfbcefb351e7e43138d
First attempt had just one file created under temp.

I know why we see this, it appears this component is already part of the image (preinstalled, part of gallery image).
Created fresh VM out of Windows Server 2022 image and Windows Server Hosting is installed, together with Runtime and ASP.NET Core Shared Framework.
This is why, when you add IIS, you need /repair to redeploy aspnetcore module under IIS.

Do you think base image of Windows should have just dotnet runtime, why would you install Windows Server Hosting if IIS role is missing?

@wtgodbe
Copy link
Member

wtgodbe commented Apr 21, 2023

That's a good question, I'm not sure how much control/impact we have on those images - @Tratcher do you happen to know if we work with the team who makes those default VMs, or why ANCM would be installed by default on them when IIS isn't enabled?

@Tratcher
Copy link
Member

Yes, we work with the eng team to ask for specific things to be installed. Start with first responders.

@Tratcher
Copy link
Member

Wait, those aren't our CI VMs, those are official public VM images? @tomasmsft where are you getting this VM image, Azure?

@tomasmsft
Copy link
Author

Yes, this is Azure deployment, Windows Server 2022 gallery image

"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-datacenter",
"version": "latest"

Im using managed image service to customize image, to add additional software and I was surprised dotnethosting is installed already. Its listed under Add/Remove programs, together with Microsoft Edge.
I deployed VM in my private subscription, just to verify dotnet is not pushed together with Policy deployments, its not - I can confirm its part of the image.

@joeloff
Copy link
Member

joeloff commented Apr 24, 2023

There were some changes in the market images last year that were deployed around January this year IIRC. Mostly not using the hosting bundle as the default installation because IIS is turned off on the images by default and it unnecessarily added the ASP.NET runtime. I think they still ended settling on the hosting bundle so that users could easily enable IIS/ANCM, but I need to double check on that.

@wtgodbe wtgodbe added this to the Backlog milestone Apr 26, 2023
@ghost
Copy link

ghost commented Apr 26, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@wtgodbe wtgodbe added bug This issue describes a behavior which is not expected - a bug. External This is an issue in a component not contained in this repository. It is open for tracking purposes. labels Apr 26, 2023
@leomoty
Copy link

leomoty commented May 5, 2023

Same issue I reported here #47128 , I believed it was syscheck related, but it wasnt

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework bug This issue describes a behavior which is not expected - a bug. External This is an issue in a component not contained in this repository. It is open for tracking purposes. feature-installers Includes: Installers
Projects
None yet
Development

No branches or pull requests

6 participants