PostWireMockMiddlewareInit not invoked #388

Closed
opened 2025-12-29 15:22:33 +01:00 by adam · 2 comments
Owner

Originally created by @jantanis on GitHub (Dec 8, 2021).

Describe the bug

PostWireMockMiddlewareInit in registered, but not invoked.

Expected behavior:

app.Run from PostWireMockMiddlewareInit is triggered AFTER WireMock has processed.

Test to reproduce

See sample solution: Run and go to http://localhost/test.
WM.Middleware.zip

Originally created by @jantanis on GitHub (Dec 8, 2021). ### Describe the bug PostWireMockMiddlewareInit in registered, but not invoked. ### Expected behavior: app.Run from PostWireMockMiddlewareInit is triggered AFTER WireMock has processed. ### Test to reproduce See sample solution: Run and go to http://localhost/test. [WM.Middleware.zip](https://github.com/WireMock-Net/WireMock.Net/files/7676933/WM.Middleware.zip)
adam added the question label 2025-12-29 15:22:33 +01:00
adam closed this issue 2025-12-29 15:22:33 +01:00
Author
Owner

@StefH commented on GitHub (Jan 3, 2022):

Hello @jantanis

The callbacks are executed, the breakpoint is triggered.

image

(However, the app.Run() code does not seem to work...)

However, I normally use code like this:
image

@StefH commented on GitHub (Jan 3, 2022): Hello @jantanis The callbacks are **executed**, the breakpoint is triggered. ![image](https://user-images.githubusercontent.com/249938/147974334-6cdcd396-504c-43b2-84dc-82d50590952d.png) (However, the `app.Run()` code does not seem to work...) However, I normally use code like this: ![image](https://user-images.githubusercontent.com/249938/147974581-1c757aaf-c69d-4a52-9937-502ec05cdd0c.png)
Author
Owner

@StefH commented on GitHub (Feb 27, 2022):

Dear @jantanis, I'm closing this now.
Please reply if you still need help.

@StefH commented on GitHub (Feb 27, 2022): Dear @jantanis, I'm closing this now. Please reply if you still need help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#388