android signalR hubconnection application negotiation failed with server

Sina

hi i'm new in android developing and i want to write an application which use signalR java-client. in first step i did the answer of this and here is my client code:

Platform.loadPlatformComponent(new AndroidPlatformComponent());
String host = "localhost";
HubConnection connection = new HubConnection( host);
HubProxy hub = connection.createHubProxy("HubConnectionAPI");

SignalRFuture<Void> awaitConnection = connection.start(new LongPollingTransport(connection.getLogger()));
try {
    awaitConnection.get();
} catch (InterruptedException e) {
    e.printStackTrace();
} catch (ExecutionException e) {
    e.printStackTrace();
}

hub.subscribe(this);
try {
    hub.invoke("DisplayMessageAll", "message from android client").get();
    System.out.println("sent!!!");
} catch (InterruptedException e) {
    e.printStackTrace();
} catch (ExecutionException e) {
    e.printStackTrace();
}

and u can download the server code from here

i have following error with awaitConnection.get();

error:

W/System.err: java.util.concurrent.ExecutionException: microsoft.aspnet.signalr.client.transport.NegotiationException: There was a problem in the negotiation with the server

i also have this error:

Caused by: microsoft.aspnet.signalr.client.http.InvalidHttpStatusCodeException:Invalid status code: 404

can anyone please help me? i searched a lot but i didn't found anything helpful for me

EDIT:

clients can access the hub via this but how can i implement on android so my application can connect?

this is the log file on server:

2015-11-11 09:05:08 10.2.0.18 GET /signalr/negotiate clientProtocol=1.3&connectionData=%5B%7B%22name%22%3A%22hubconnectionapi%22%7D%5D 80 - 10.2.0.253 SignalR+(lang=Java;+os=android;+version=2.0) - 404 0 2 3
Sina

changed the String host = "localhost";

to String host = "localhost/signalr";

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Application Installation Failed in Android Studio

From Dev

Android chat application server suggestion?

From Dev

Android - Sharepoint Server Application communication

From Dev

Android Application Network Error failed to connect

From Dev

MQ: Connection to host rejected | Channel negotiation failed

From Dev

Calling server side function from signalR in Android

From Dev

Shiny server: application failed to start

From Dev

LWP::UserAgent and 500 SSL negotiation failed

From Dev

SignalR dispose of HubConnection

From Dev

SignalR Java Client - NegotiationException when starting HubConnection

From Dev

android signalR hubconnection application negotiation failed with server

From Dev

Cross Domain Negotiation request error with SignalR

From Dev

SignalR Client HubConnection.Start() throws exception and doesn't keep trying to connect like the documentation says it should

From Dev

Using SignalR as a standalone server application, and not an Asp.Net one

From Dev

Android Application Network Error failed to connect

From Dev

The Security Support Provider Interface (SSPI) negotiation failed

From Dev

Appcelerator/Titanium Android theme - Failed to package application

From Dev

500 SSL negotiation failed

From Dev

ssh algorithm negotiation failed

From Dev

Apache SSL error: Re-negotiation handshake failed: Not accepted by client?

From Dev

OpenVPN - TLS key negotiation failed on Raspbian

From Dev

Algorithm Negotiation failed when trying to connect to server

From Dev

Shiny server: application failed to start

From Dev

Server error in '/' application - Login failed for user

From Dev

Slow SignalR HubConnection Start

From Dev

Fix SSL negotiation failed

From Dev

Error -- KIO Client Could not connect to host ... SSL negotiation failed

From Dev

Application Installation Failed - Android Studio 3.0.1

From Dev

Shiny server: application failed to start on AWS

Related Related

  1. 1

    Application Installation Failed in Android Studio

  2. 2

    Android chat application server suggestion?

  3. 3

    Android - Sharepoint Server Application communication

  4. 4

    Android Application Network Error failed to connect

  5. 5

    MQ: Connection to host rejected | Channel negotiation failed

  6. 6

    Calling server side function from signalR in Android

  7. 7

    Shiny server: application failed to start

  8. 8

    LWP::UserAgent and 500 SSL negotiation failed

  9. 9

    SignalR dispose of HubConnection

  10. 10

    SignalR Java Client - NegotiationException when starting HubConnection

  11. 11

    android signalR hubconnection application negotiation failed with server

  12. 12

    Cross Domain Negotiation request error with SignalR

  13. 13

    SignalR Client HubConnection.Start() throws exception and doesn't keep trying to connect like the documentation says it should

  14. 14

    Using SignalR as a standalone server application, and not an Asp.Net one

  15. 15

    Android Application Network Error failed to connect

  16. 16

    The Security Support Provider Interface (SSPI) negotiation failed

  17. 17

    Appcelerator/Titanium Android theme - Failed to package application

  18. 18

    500 SSL negotiation failed

  19. 19

    ssh algorithm negotiation failed

  20. 20

    Apache SSL error: Re-negotiation handshake failed: Not accepted by client?

  21. 21

    OpenVPN - TLS key negotiation failed on Raspbian

  22. 22

    Algorithm Negotiation failed when trying to connect to server

  23. 23

    Shiny server: application failed to start

  24. 24

    Server error in '/' application - Login failed for user

  25. 25

    Slow SignalR HubConnection Start

  26. 26

    Fix SSL negotiation failed

  27. 27

    Error -- KIO Client Could not connect to host ... SSL negotiation failed

  28. 28

    Application Installation Failed - Android Studio 3.0.1

  29. 29

    Shiny server: application failed to start on AWS

HotTag

Archive