0

I am developing real-time network application using SignalR. I have Web and Windows Form clients. I am using QueryString to pass the parameter "param" from Web App client to server using this javascript:

         $(function () {
            //Set the hubs URL for the connection
            $.connection.hub.url = "http://localhost:8089/signalr";                

            // Declare a proxy to reference the hub. Declare queryString param
            $.connection.hub.qs = "param" + urlParams['param'];
            $.connection.hub.start();
...

On server side i am using:

   public override Task OnConnected()
   {
        var queryStr = Context.QueryString["param"];

        if (queryStr == value )
           DoSmth();
        else DoSmth2();
   }

I need to pass parameter "param" using QueryString from Windows Form App. I need something like : $.connection.hub.qs = "param" + urlParams['param']; but for Windows Form app. How to do it?

1 Answer 1

9

I solved it. I found this: "We have a bug in our logic that builds the url. We'll fix this for 0.5.3." If you want to work around it for now you can append /signalr to the url:

var connection = new HubConnection("http://localhost/signalr", "a=b");

https://github.com/SignalR/SignalR/issues/581

Sign up to request clarification or add additional context in comments.

1 Comment

MSDN docs for the HubConnection constructor: msdn.microsoft.com/en-us/library/jj879494(v=vs.111).aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.