Closed bangbingsyb closed 6 years ago
Let's move this back to IISIntegration. The project is almost an exact duplicate of the one already there and it will be easier to maintain if kept together. As for WebSockets it can be handled one of two ways: 1) Write a WebSocket specific test in the WebSocket repo. We should do this for Autobahn anyways. 2) Don't depend on the middleware, most of the functionality comes directly from CoreFx so you can call it directly. You primarily need these lines: https://github.com/aspnet/WebSockets/blob/6de76c5e69bd74b8d5742642e1e90a2a39874323/src/Microsoft.AspNetCore.WebSockets/WebSocketMiddleware.cs#L42 https://github.com/aspnet/WebSockets/blob/6de76c5e69bd74b8d5742642e1e90a2a39874323/src/Microsoft.AspNetCore.WebSockets/WebSocketMiddleware.cs#L120-L125
@Tratcher Yeah, pretty much a replication of the sample app there + websocket. I'd prefer IISIntegration as well to make everything needed from one place. And the whole reason for bothering ServerTest is because this circular dependency issue of websocket. Let me try to directly call CoreFx in the app.
@bangbingsyb ping me if you need any help modifying the IISIntegration app.
@Tratcher @jkotalik Go back to the option of removing dependency on the WebSockets middleware. I briefly reviewed the middleware source, and want to confirm with you whether the proposed change is the right thing to do:
I feel if that's the case, I will probably duplicate half of the WebSockets middleware code in my app. Does that sound OK to you?
On the other hand, if I directly call CoreFx, I still need to reimplement upgrade check, websocket headers etc, which still duplicates the same work as the middleware and seems to be unnecessary.
You don't need the IHttpWebSocketFeature at all. You can bypass it and go directly to the IHttpUpgradeFeature feature. Most of IHttpWebSocketFeature is argument validation anyways. Let me know when you have a few minutes and we can hack together a sample in person.
Since I've sent the PR to IISIntegration, close this PR.
Working on developing stress tests for IIS ASP.NET Core Module and IISIntegration. One of the challenge for the daily stress test is that we want to build the test app with all the dependencies up-to-date.
The proposed approach is to add the app as a sample to ServerTests repo, and update the PackageReference in the project file to consume the version variables provided by the repo.