Thursday, September 6, 2012

Update: signalR-0.5.3 and mvc4 worked

I want to try out the signalR library in mvc 4, so pretty much I follow the basic tutorial to have the basic "chat" program. First,  I run Install-Package "signalR" to install the packages in to the project.
After quickly get the codes there, and hit F5. Oops, it doesn't work. Then here is long hours google and try but I just have no luck. Browsing to "/signalr/hubs" just always gives me the 404 error.

Just an experiment, I recreated a mvc 3 project and running the same codes. This time, browse to "/signalr/hubs" actually returns me the proxy javascript. But I still have javascript error when I tried to send the message (strat to chat). However, If I use an old version (0.3.4), it all WORKS prefectly. The version I get from the msdn sample in here.

Update: Just saw on 11 Sep, there is a new update from Nuget. So I installed it to my MVC4 project.
But specifically in the package manage console, I am running,
install-package signalR -version 0.5.3 <projectname>

Then it all worked. only still in the _layout file,
I am using
<script src="@url.Content("~/scripts/jquery.signalr-0.5.3.min.js") type="text/javascript"></script>
rather than
mvc4 bundle javascript, @Scripts.Render(...)

Next, we can explore how to use signalR within BizTalk to be able to update the client the service/task progress.




No comments: