Last post Sep 02, 2013 12:29 PM by MichaelDBang
Dec 14, 2012 10:58 AM|pantonis|LINK
I have a scenario that I have a windows forms application that is using SignalR and a website. The client app is authenticated on the website using FormsAuthentication and the calls a Hubmethod with the [Authorize] attribute. Everything works find when I
debug both application on same machines. Once I deploy website on one server and win app on another machine hub methods with authorized attribute do not work.
Why is this happening. Is there any bug on this?
Dec 14, 2012 11:47 AM|DamianEdwards|LINK
Can you try looking at the HTTP requests to see what cookies are/aren't being passed? Also, what you're client code looks like.
Dec 17, 2012 02:24 AM|pantonis|LINK
My code is the following.
void Connect(Cookie authCookie)
string str = "Test";
double Val = 1000;
HubConnection hubConn = new HubConnection("http://10.10.10.10");
CookieContainer cookieCont = new CookieContainer();
hubConn.CookieContainer = cookieCont;
IHubProxy Proxy = hubConn.CreateHubProxy("myHub");
Name = str,
Value = Val
public void GetTheStuff(string Message)
CustomModel cp = jss.Deserialize<CustomModel>(Message);
if (cp != null)
Jan 17, 2013 03:35 PM|DamianEdwards|LINK
Your code has a few issues:
Can you please take a look at the sample at https://github.com/davidfowl/MessengR
This shows a WPF client talking to an ASP.NET app using Forms auth and SignalR.
Jan 18, 2013 02:54 AM|pantonis|LINK
Sorry for this (syntax error)
Serialization/Deserialization as you described it works only on my pc. When I take this on production server it does not work.
Jan 19, 2013 01:43 PM|davidfowl|LINK
When you say "it doesn't work on your production server". What exactly do you mean? What specific error message are you getting?
Jan 20, 2013 03:17 AM|pantonis|LINK
It does not return any error. When the signalr sends the object, the event on the other end which is subscribed to listen simply does not get fired
Sep 01, 2013 02:51 PM|MichaelDBang|LINK
I am running into a problem like this one. I am currently wiring up ASP.NET Oauth functionality for an ASP.NET MVC application that uses SignalR for communincation. When I log in, the FedAuth cookie is being set on the server, but the cookie does not get
resent on the SignalR client. I have to refresh the page to get the cookie refreshed and read properly in SignalR.
Thank you for any assistance,
Sep 02, 2013 12:29 PM|MichaelDBang|LINK
Alright, I was able to work around this by calling $.connection.hub.stop() and then $.connection.hub.start() right after. I did try this initially, but ran into some problems (I believe it had to do with how I was using promises). This is working as expected
for me now.