I had some free time recently and decided to learn a truly wonderful library SignalR. SignalR provides the “ability to have your server-side code push content to the connected clients as it happens, in real-time.” It eliminates the extra work of checking browser compatibility with whatever technology you decide to use for pushing the events to the client (WebSockets, EventSource, Long Polling, Forever Frame).
I implemented a simple Chat application using tutorial from Tim Teebken. It worked beautifully on local machine. However, when deployed to GoDaddy my application went down with System.Security.SecurityException
. As it turns out, SignalR can run only in Full Trust mode. What I didn’t realize is that to enable full trust you have to explicitly specify Trust Level in Web.Config:
<configuration> <system.web> <trust level="Full" /> </system.web> </configuration>
Once this line was added to the configuration and deployed, my simple Chat client started working.