Skip to content

TypeLoadException occurring when using Strongly typed Hub #3594

@Rytom71487

Description

@Rytom71487

Hi,

I'm encountering a TypeLoadException when I use a strongly typed hub. My interface is:

public interface IClientCallback
{
    void callback<T>(T msg, string eventType);
    void test(string msg, string eventType); 
}

All the methods are inside a single interface, and the interface does not inherit from any other interface.

My Hub class is:

public class ServiceHub : Hub<IClientCallback>
{
    public static readonly string ServiceHubName = "ServiceHub";

    public void Register(string name, string eventType)
    {
        Clients.All.test("hello", "world");
    }
}

When I use my client app to invoke the Register method on the hub, on the Hub application I receive an exception when it is at Clients.All.test(...):

Method 'callback' in type 'Microsoft.AspNet.SignalR.Hubs.TypedClientBuilder.IClientCallbackImpl' from assembly 'Microsoft.AspNet.SignalR.Hubs.TypedClientBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

I haven't been able to narrow down what exactly is causing this exception to be thrown. A little help or suggesting would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions