0
votes

I've "inherited" an ASP.NET 4.5 app that uses SignalR to push images to clients.

The application was developed using IIS 7.5 and works fine (on the development machine).

Now someone has actually purchased the app and I have to install it on the client's server (2012, IIS 8.5)

Now please bear in mind I am NOT a Web Developer - I've a little ASP.NET experience but that's about it.

The problem is that no images are being sent to the clients and I don't know why.

The code that sends the images is this:

 void SendImage()
    {

        var hubContext = GlobalHost.ConnectionManager.GetHubContext<Hubs.MimicHub>();
        hubContext.Clients.User(HubID).addImage(MimicImage,
        ImageWidth, ImageHeight
        );
    }

I've published the entire project onto the client's IIS folder.

No exceptions are being raised, but an important point is this : the webpage is supposed to be updated every second (it's animation) via a timer. The timer is enabled, but the web page does not refresh. At all. I'm thinking something has gone screwy with SignalR.

On the development machine, it all works fine. The ASP stuff works fine, Application Pools are the same (but interestingly ASP.NET 4.5 is on the client, 4.0 is on the development - not sure if this is relevant).

Can someone please help - is copying the application project to the client server sufficient or do I have to do something else? All the SignalR dlls are in the application project.

I've read all the SignalR deployment threads but are none the wiser. I'm not a Web Developer and am completely out of my depth.

Thanks for any help.

Addition

Ive noticed the SignalR/Connect is stuck on Status Code "101 Switching Protocols". Is this significant?

1
Windows 7/2008R2 and .NET Framework 4 did not support webSockets. It seems that once you moved your application to Windows 2012 the server suddenly started supporting WebSockets - hence the 101 which means protocol upgrade (from http to websockets). I don't know why your application would stop working when webSockets are enabled but if this is the reason you can a) figure out and fix the issue b) try disabling webSockets in the IIS on the server side (it will affect all the application on the server though) c) tell the client to not use webSockets - you can pass transports to Start()Pawel
Thank you so much - I forced the start to 'longPolling' ! Can you post this as an answer and I'll accept itMuckers Mate

1 Answers

3
votes

Windows 7/2008R2 (and .NET Framework 4) did not support webSockets. It seems that once you moved your application to Windows 2012 your server suddenly started supporting WebSockets - hence the 101 status code which means protocol upgrade (from http to websockets). I don't know why your application would stop working when webSockets are enabled but if this is the reason you can

  • figure out and fix the issue
  • try disabling webSockets in the IIS on the server side (it will affect all the applications on the server though)
  • tell the client to not use webSockets - you can pass transports the client is supposed to use to the Start() method