SignalR and Azure Websites Error

SignalR and Azure Websites Weird Error

Working with some finishing touches making my Push Demos more consistent I started encounter a failure with SignalR when I deployed to my Azure Website.  I had to deploy the JS code with a debugger; statement and then use Chrome to get the actual error:

“The data protection operation was unsuccessful”

I am still working to understand what this actually means but in the meantime Stack Overflow was once again useful in finding a way around this problem:

It seems to be related to the Cryptography settings on Azure Websites, I hope to provide more useful information later.  For now, I hope to save people anguish by at least offering a solution.


After conversations with David Fowler and Damian Edwards (the creators of SignalR) I have discovered the above implementation is extremely insecure and not recommended.  The problem is actually the usage of a custom Dependency Resolver for SignalR.  Because mine is custom, to allow dependency injection via Ninject, I was not getting the provided IProtectedData dependency.  The answer, for Ninject is the following block:


This will correctly fix the problem and maintain security.  Cheers

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s