Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with SignalR using NuGet

I am having a problem setting up a simple test project for SignalR.

I installed SignalR in VS WD Express 2010 using NuGet, but when I try to run my site I get the following Asp.Net error page. (It looks like all assemblies are added correctly by NuGet)

Anyone seen this before?

Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR

[TypeLoadException: Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.]
   SignalR.Hosting.AspNet.AspNetBootstrapper.Initialize() +0

[InvalidOperationException: The pre-application start initialization method Initialize on type SignalR.Hosting.AspNet.AspNetBootstrapper threw an exception with the following error message: Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

[HttpException (0x80004005): The pre-application start initialization method Initialize on type SignalR.Hosting.AspNet.AspNetBootstrapper threw an exception with the following error message: Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090876
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
like image 270
TGH Avatar asked Jun 23 '12 23:06

TGH


People also ask

What is a SignalR error?

This error may be seen if the project contains a folder called SignalR, which will interfere with the automatically-created proxy. To avoid this error, do not use a folder called SignalR in your application, or turn automatic proxy generation off.

Is SignalR full duplex?

SignalR supports full duplex communication that allows the client and server to transfer data back and forth.

What protocol is used by SignalR?

SignalR provides two built-in hub protocols: a text protocol based on JSON and a binary protocol based on MessagePack. MessagePack generally creates smaller messages compared to JSON. Older browsers must support XHR level 2 to provide MessagePack protocol support.

When should I use SignalR?

SignalR can be used to add any sort of "real-time" web functionality to your ASP.NET application. While chat is often used as an example, you can do a whole lot more. Any time a user refreshes a web page to see new data, or the page implements long polling to retrieve new data, it is a candidate for using SignalR.


1 Answers

The name of your project is SignalR, change it.

like image 91
davidfowl Avatar answered Oct 18 '22 00:10

davidfowl