WireMock-Net / WireMock.Net

WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Apache License 2.0
1.36k stars 200 forks source link

Running with IIS or IIS Express InProcess receives 500.37 #935

Closed fromorbonia closed 8 months ago

fromorbonia commented 1 year ago

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:

Expected behavior:

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

Test to reproduce

StefH commented 1 year ago

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

StefH commented 1 year ago

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

StefH commented 12 months ago

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

fromorbonia commented 11 months ago

@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.

StefH commented 11 months ago

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

fromorbonia commented 10 months ago

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

StefH commented 10 months ago

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.

fromorbonia commented 10 months ago

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... ?

StefH commented 8 months ago

Closing...