Skip to content

Chat sample SignalR cannot connect. #34

@MehdiJafari84

Description

@MehdiJafari84

Hello
Your chat sample can not connect!
I installed NCache in my MVC project but I have same error with SignalR 2.4.0 as you suggested.
Error:
Could not connect:Error: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.

public void Configuration(IAppBuilder app)
        {
            var hubConfiguration = new HubConfiguration
            {
                EnableJavaScriptProxies = true
            };
            ConfigureOAuth(app);
            string cache, eventKey, userId = null, password = null;
            if (ConfigurationManager.AppSettings["cache"] != null)
                cache = ConfigurationManager.AppSettings["cache"];
            else
                throw new Exception("Cache Name is required to start the application");
            if (ConfigurationManager.AppSettings["eventKey"] != null)
                eventKey = ConfigurationManager.AppSettings["eventKey"];
            else
                throw new Exception("EventKey is required to start the application");
            if (ConfigurationManager.AppSettings["userID"] != null)
                userId = ConfigurationManager.AppSettings["userID"];
            if (ConfigurationManager.AppSettings["password"] != null)
                password = ConfigurationManager.AppSettings["password"];
            GlobalHost.DependencyResolver.UseNCache(cache, eventKey, userId, password);
            app.MapSignalR(hubConfiguration);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions