You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Asp.Net 6.X app fails to run as a Windows Service in Windows Server Core/Docker container #70751
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.
@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?
Activity
amaltinsky commentedon Jun 14, 2022
Tagging @ericstj as the area lead
danmoseley commentedon Jun 15, 2022
@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?
eerhardt commentedon Aug 18, 2022
I've opened #74188 to backport this change to
release/6.0.rosebyte commentedon Jan 21, 2026
Since net6.0 isn`t supported now, I guess we can close this issue.
karelz commentedon Jan 22, 2026
Fixed in #74188