-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The 'Connection' header value 'Upgrade, Upgrade' is invalid. #315
Comments
thanks for your feedback. it seems that IIS returned 2
I don't know why there are 2 ValidateHeader(response.Headers, HttpKnownHeaderNames.Connection, "Upgrade");
private static void ValidateHeader(HttpHeaders headers, string name, string expectedValue)
{
if (headers.NonValidated.TryGetValues(name, out HeaderStringValues hsv))
{
if (hsv.Count == 1)
{
foreach (string value in hsv)
{
if (string.Equals(value, expectedValue, StringComparison.OrdinalIgnoreCase))
{
return;
}
break;
}
}
throw new WebSocketException(WebSocketError.HeaderError, SR.Format(SR.net_WebSockets_InvalidResponseHeader, name, hsv));
}
throw new WebSocketException(WebSocketError.Faulted, SR.Format(SR.net_WebSockets_MissingResponseHeader, name));
} I haven't found root cause yet. so let's use HttpPooling instead of WebSocket var io = new SocketIO(SocketIOOptions
{
AutoUpgrade = false,
}); |
doghappy
changed the title
Not able to make Connection to Server.
Not able to make Connection to IIS Server.
Mar 31, 2023
doghappy
changed the title
Not able to make Connection to IIS Server.
The 'Connection' header value 'Upgrade, Upgrade' is invalid.
Mar 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
We are having a node.js Server for socket.io and have hosted it to IIS server.
And for client side we are using SocketIOClient package in .net core 6.0.
as we try to start a connection we face an issue
"TransportException: Could not connect to 'ws://localhost:8000/socket.io/?EIO=4&transport=websocket'"
"The 'Connection' header value 'Upgrade, Upgrade' is invalid."
But when we try to make connection without hosting it to IIS server ( normally in local). It is working fine but after hosting it to IIS Server, we are not able to make connection.
Here is the image from index.js of server side.
Can you please guide me to resolve this issue.
The text was updated successfully, but these errors were encountered: