Skip to content
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

Having trouble with Starting connection on shared host #11

Closed
davbaron opened this issue Apr 17, 2019 · 1 comment
Closed

Having trouble with Starting connection on shared host #11

davbaron opened this issue Apr 17, 2019 · 1 comment

Comments

@davbaron
Copy link

Hello Sörnt,

After getting things working fine on my local IIS, I have migrated (web-deploy) my web-api site to a shared host (SmarterASP.net). Everything in the web-api site works fine, except SignalR. Using the same Flutter client, when I try to 'start' the connection, I get errors back. Here is the output:

flutter: FINER: 2019-04-16 20:01:37.074299: Starting HubConnection.
flutter: FINER: 2019-04-16 20:01:37.074538: Starting connection with transfer format 'TransferFormat.Text'.
flutter: FINER: 2019-04-16 20:01:37.074753: Sending negotiation request: http://core.totalinsulators.com/activity/negotiate
flutter: FINEST: 2019-04-16 20:01:37.108143: HTTP send: url 'http://core.totalinsulators.com/activity/negotiate', method: 'POST' content: ''
flutter: FINER: 2019-04-16 20:01:37.317341: Selecting transport 'HttpTransportType.WebSockets'
flutter: FINEST: 2019-04-16 20:01:37.317636: (WebSockets transport) Connecting
flutter: FINEST: 2019-04-16 20:01:37.317825: WebSocket try connecting to 'ws://core.totalinsulators.com/activity?id=pqZn4dku_8kKw9ZPf1hQ9A'.
flutter: SEVERE: 2019-04-16 20:01:37.594430: Failed to start the transport 'HttpTransportType.WebSockets': WebSocketException: Connection to 'http://core.totalinsulators.com:0/activity?id=pqZn4dku_8kKw9ZPf1hQ9A#' was not upgraded to websocket
flutter: FINER: 2019-04-16 20:01:37.594694: Selecting transport 'HttpTransportType.ServerSentEvents'
flutter: FINER: 2019-04-16 20:01:37.594864: Sending negotiation request: http://core.totalinsulators.com/activity/negotiate
flutter: FINEST: 2019-04-16 20:01:37.608133: HTTP send: url 'http://core.totalinsulators.com/activity/negotiate', method: 'POST' content: ''
flutter: FINEST: 2019-04-16 20:01:37.734439: (SSE transport) Connecting
flutter: FINER: 2019-04-16 20:01:37.734978: Sending handshake request.
flutter: FINEST: 2019-04-16 20:01:37.735238: Sending message.
flutter: FINEST: 2019-04-16 20:01:37.735467: (SSE transport) sending data.
flutter: FINEST: 2019-04-16 20:01:37.735974: HTTP send: url 'http://core.totalinsulators.com/activity?id=svK4GauaoO4qHqINyMOpSw', method: 'POST' content: '{"protocol":"json","version":1}<…>
flutter: had error starting hub connection: HttpException: Invalid response status code, uri = http://core.totalinsulators.com/activity?id=svK4GauaoO4qHqINyMOpSw

I am guessing this might be a server thing, but would like your opinion before asking the Server people. If it helps, when I did my 'publish', my options were:

Configuration: Release 
Target Framework: netcoreapp2.2
Deployment Mode: Self-Contained
Target Runtime: win-x86

Those were based on recommendations by the host vendor.

Thank you.

@davbaron davbaron changed the title Having trouble with Handshake on shared host Having trouble with Starting connection on shared host Apr 17, 2019
@davbaron
Copy link
Author

After some back-and-forth with my shared hosting vendor (SmarterASP.net), they tried 'turning off' a security product called SiteGuard. Apparently SiteGuard blocks WebSockets traffic and thus was causing my problem. With SiteGuard 'off', all works fine. I have contacted SiteGuard and asked them if their product can be configured to allow WebSockets traffic, but still provide the other security benefits. In any case, this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant