Running with IIS or IIS Express InProcess receives 500.37 #513

Closed
opened 2025-12-29 08:29:21 +01:00 by adam · 9 comments
Owner

Originally created by @fromorbonia on GitHub (May 8, 2023).

Originally assigned to: @StefH on GitHub.

Describe the bug

Starting a WireMock project in Visual Studio 2019 or 2022 using IIS Express InProcess mode displays the following server error:

HTTP Error 500.37 - ASP.NET Core app failed to start within startup time limit
Common solutions to this issue:
ASP.NET Core app failed to start after 20000 milliseconds
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect

Looking at the stderr logs, both InProcess and Out Of Process appear the same, but in the InProcess mode it never appears to receive the initial request. Implying that IIS Express isn't forwarding it correctly.

It's probably a simply config error, but really out of ideas, I've spent a few hours trying different combinations:

  • ASP.NET Core 3.1 and just upgraded to .NET 6.0
  • Any CPU, x86 and x64
  • Deployed to an IIS IIS server with Web Deploy (when I enabled OutOfProcess on 3.1 it failed still, but I could get it working OutOfProcess on .NET 6.0
  • HTTP and HTTPS
  • Version 1.5.5 and 1.5.24

Expected behavior:

When the browser opens I'm expecting to see the standard {"Status":"No matching mapping found"} json.

Test to reproduce

  • Configure VS2019 or VS2022 to run the project with IIS Express
  • Start
  • Web browser opens on default URL, and sits there until timeout and displays above message.

There are a lot of similarities to https://github.com/WireMock-Net/WireMock.Net/issues/564, but I'm just trying to run locally or deploy to an IIS server with Web Deploy, not onto Azure.

Originally created by @fromorbonia on GitHub (May 8, 2023). Originally assigned to: @StefH on GitHub. ### Describe the bug Starting a WireMock project in Visual Studio 2019 or 2022 using IIS Express InProcess mode displays the following server error: ``` HTTP Error 500.37 - ASP.NET Core app failed to start within startup time limit Common solutions to this issue: ASP.NET Core app failed to start after 20000 milliseconds Troubleshooting steps: Check the system event log for error messages Enable logging the application process' stdout messages Attach a debugger to the application process and inspect ``` Looking at the stderr logs, both InProcess and Out Of Process appear the same, but in the InProcess mode it never appears to receive the initial request. Implying that IIS Express isn't forwarding it correctly. It's probably a simply config error, but really out of ideas, I've spent a few hours trying different combinations: - ASP.NET Core 3.1 and just upgraded to .NET 6.0 - Any CPU, x86 and x64 - Deployed to an IIS IIS server with Web Deploy (when I enabled OutOfProcess on 3.1 it failed still, but I could get it working OutOfProcess on .NET 6.0 - HTTP and HTTPS - Version 1.5.5 and 1.5.24 ### Expected behavior: When the browser opens I'm expecting to see the standard {"Status":"No matching mapping found"} json. ### Test to reproduce - Configure VS2019 or VS2022 to run the project with IIS Express - Start - Web browser opens on default URL, and sits there until timeout and displays above message. - ### Other related info There are a lot of similarities to https://github.com/WireMock-Net/WireMock.Net/issues/564, but I'm just trying to run locally or deploy to an IIS server with Web Deploy, not onto Azure.
adam added the question label 2025-12-29 08:29:21 +01:00
adam closed this issue 2025-12-29 08:29:21 +01:00
Author
Owner

@StefH commented on GitHub (May 18, 2023):

@fromorbonia
Can you give information on which example app in this solution, or which project your are trying to use?

@StefH commented on GitHub (May 18, 2023): @fromorbonia Can you give information on which example app in this solution, or which project your are trying to use?
Author
Owner

@StefH commented on GitHub (Jun 23, 2023):

@fromorbonia
Can you give information on which example app in this solution, or which project your are trying to use?

@StefH commented on GitHub (Jun 23, 2023): @fromorbonia Can you give information on which example app in this solution, or which project your are trying to use?
Author
Owner

@StefH commented on GitHub (Jul 11, 2023):

@fromorbonia
Can you give information on which example app in this solution, or which project your are trying to use?

@StefH commented on GitHub (Jul 11, 2023): @fromorbonia Can you give information on which example app in this solution, or which project your are trying to use?
Author
Owner

@fromorbonia commented on GitHub (Jul 19, 2023):

@StefH - sorry, didn't see your reply. So it wasn't an example app, it is my own app with WireMock installed via NuGet. If you ware not getting the same problem, I can try an example app.

@fromorbonia commented on GitHub (Jul 19, 2023): @StefH - sorry, didn't see your reply. So it wasn't an example app, it is my own app with WireMock installed via NuGet. If you ware not getting the same problem, I can try an example app.
Author
Owner

@StefH commented on GitHub (Aug 5, 2023):

@fromorbonia any update on this?
Or can I close it?

@StefH commented on GitHub (Aug 5, 2023): @fromorbonia any update on this? Or can I close it?
Author
Owner

@fromorbonia commented on GitHub (Aug 22, 2023):

@StefH - I did reply saying it wasn't an example app...?

@fromorbonia commented on GitHub (Aug 22, 2023): @StefH - I did reply saying it wasn't an example app...?
Author
Owner

@StefH commented on GitHub (Aug 22, 2023):

Sorry, I don' get it.

Can you please provide a full example which demonstrates this issue? From that code example, I can take a look what goes wring.

@StefH commented on GitHub (Aug 22, 2023): Sorry, I don' get it. Can you please provide a full example which demonstrates this issue? From that code example, I can take a look what goes wring.
Author
Owner

@fromorbonia commented on GitHub (Aug 22, 2023):

My initial question was really - does anyone else have the same problem? From what you are saying, and the lack of "me toos" that isn't the case.
I've just tried to recreate from scratch, but it must be something to do with my initial .NET Core 31 implementation that carried through the .NET 6 upgrade.
Doing a very quick Visual Studio 2022 new ASP.NET Core Web App project, adding in WireMock.NET via NuGet - pulling over the key files (e.g. WireMockService.cs from the broken project. I could not reproduce, and it ran InProcess just fine.
So I think close it... ?

@fromorbonia commented on GitHub (Aug 22, 2023): My initial question was really - does anyone else have the same problem? From what you are saying, and the lack of "me toos" that **isn't** the case. I've just tried to recreate from scratch, but it must be something to do with my initial .NET Core 31 implementation that carried through the .NET 6 upgrade. Doing a very quick Visual Studio 2022 new ASP.NET Core Web App project, adding in WireMock.NET via NuGet - pulling over the key files (e.g. WireMockService.cs from the broken project. I could not reproduce, and it ran InProcess just fine. So I think close it... ?
Author
Owner

@StefH commented on GitHub (Nov 11, 2023):

Closing...

@StefH commented on GitHub (Nov 11, 2023): Closing...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#513