Application asp.net core 5 use websocket - VS 2022 version 17.2.3

sblb 1,231 Reputation points
2022-06-07T10:02:22.873+00:00

I've created a new app web ASP.NET CORE 5 and by defaut there the statut 101 when I run it.
while before the update VS 17.04 forward 17.2.3 I didn't have this status! the status was at 200.

I think that the websocket must be set up.
I don't want to use it and I only want to use an API but the status 101 blocks my application with API.

I would like to know what status 101 is? apparently the websocket is put by default.

209045-capture101.jpg

Have you an idea? Is it possible to disable it?

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. AgaveJoe 30,126 Reputation points
    2022-06-07T10:40:30.293+00:00

    I don't want to use it and I only want to use an API but the status 101 blocks my application with API.

    Turn off Hot Reload in Visual Studio. Debug -> "YourProjectName Debug Properties". Uncheck "Enable Hot Reload". Hot Reload does not block an API. Are you making an assumption or can you share code that illustrates how Hot Reload blocks an API?

    209114-capture.png

    I would like to know what status 101 is?

    Simply Google status 101 to learn about the how web socket switching protocols works.

    101 Switching Protocols

    0 comments No comments

  2. sblb 1,231 Reputation points
    2022-06-07T12:03:23.517+00:00

    Hi, thanks to your answer.

    Sorry, but I didn't see "Enable Hot Reload" in launch profile, why? in addition it prevents me to advance on another subject that you know.
    209060-capture.jpg

    Are you making an assumption or can you share code that illustrates how Hot Reload blocks an API?

    This is not an assumption but only an observation!
    Sorry, I didn't use the right word: it's not a block but a hold on the application.
    Moreover, I am talking about an empty application without any action.


  3. sblb 1,231 Reputation points
    2022-06-07T13:08:48.69+00:00

    he problem appeared after the VS 2022 update to 17.2.3.
    Now my application is not working anymore. Here you can find the link to my application : aspnet-core-server-side-processing-to-acces-to-the.html

    I got the message MikeGebhard-6464 that's said :
    The URL looks like a web socket connection not a Web API request.

    And really I don't understand why I have a websocket connection and put the application on hold.

    So I've creaed a you app to and I've already the on hold and websocket connection :
    209145-capture.jpg

    Tools > Options > Projects and Solutions > ASP.NET Core > Auto build and refresh option Select None.

    I've tried to modify like you it does not change anything.

    Is it possible to disable websocket?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.