Skip to content

Asp.Net 6.X app fails to run as a Windows Service in Windows Server Core/Docker container #70751

Closed

Description

@amaltinsky

Description

As reported before in (#52416, #50020), asp.net fails the IsWindowsService() check on Windows Server Core and in Docker containers. This breaks all asp.net services on these platforms, requiring brittle workarounds.

This issue was fixed in #62452 but unfortunately, the fix (36bf84f) was not back ported to existing dotnet versions, including 6.0 despite being an LTS release that's supposed to be supported for over two more years.

Reproduction Steps

Create an ASP.Net Windows Service and run it in a Docker container.
Check IsWindowsService()

Expected behavior

IsWindowsService() should return true when running as a service

Actual behavior

IsWindowsService() returns false, causing .UseWindowsService() to not configure the app properly.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jun 14, 2022
  2. amaltinsky commented on Jun 14, 2022

    @amaltinsky
    Author

    Tagging @ericstj as the area lead

  3. danmoseley commented on Jun 15, 2022

    @danmoseley
    Contributor

    @eerhardt (as you made the fix) this seems like a good backport candidate, low risk change and apparently has impacted a number of customers. thoughts?

  4. added this to the 6.0.x milestone on Jun 21, 2022
  5. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 21, 2022
  6. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 18, 2022
  7. eerhardt commented on Aug 18, 2022

    @eerhardt
    Member

    I've opened #74188 to backport this change to release/6.0.

  8. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Sep 7, 2022
  9. rosebyte commented on Jan 21, 2026

    @rosebyte
    Member

    Since net6.0 isn`t supported now, I guess we can close this issue.

  10. karelz commented on Jan 22, 2026

    @karelz
    Member

    Fixed in #74188

  11. locked and limited conversation to collaborators on Feb 22, 2026
  12. modified the milestones: 6.0.x, 11.0.0 on Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions