whebz
whebz

Reputation: 121

SignalR MethodAccessException

i got this error when i try to debug a simple signalr app

Attempt to access the method 'Microsoft.AspNet.SignalR.DependencyResolverExtensions.InitializePerformanceCounters(Microsoft.AspNet.SignalR.IDependencyResolver, System.String, System.Threading.CancellationToken)' by the method 'Microsoft.AspNet.SignalR.RouteExtensions.MapHubs(System.Web.Routing.RouteCollection, System.String, Microsoft.AspNet.SignalR.IDependencyResolver)' failed

=== Edited [Added more INFO] ===

ok added SignalR by typing this on Nuget Consolse

Install-Package Microsoft.AspNet.SignalR -pre 

i added a repo here

Upvotes: 5

Views: 454

Answers (2)

whebz
whebz

Reputation: 121

<?xml version="1.0" encoding="utf-8"?>
  <packages>
    <package id="jQuery" version="1.6.4" targetFramework="net45" />
    <package id="Microsoft.AspNet.SignalR.Core" version="1.0.0-rc1" targetFramework="net45" />
    <package id="Microsoft.AspNet.SignalR.Hosting.AspNet" version="1.0.0-alpha2" targetFramework="net45" />
    <package id="Microsoft.AspNet.SignalR.Hosting.Common" version="1.0.0-alpha2" targetFramework="net45" />
    <package id="Microsoft.AspNet.SignalR.JS" version="1.0.0-rc1" targetFramework="net45" />
    <package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
  </packages>

the versions installed were mixed between alpha and rc1.

Upvotes: 1

Jalal El-Shaer
Jalal El-Shaer

Reputation: 14710

I solved the error by changing the .csproj file ...

It had (may be MVC 3 or so):

<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};

into MVC 4 project:

<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};

Upvotes: 0

Related Questions