c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
asp.net MVC

No assembly found containing an OwinStartupAttribute

| | MVC

I got the following error while running the application. I have created a simple chat application using signalR in asp.net mvc.  I have installed signalR in the project by nuget package manager console and registered signalR hub in the page.

The following errors occurred while attempting to load the app.
- No assembly found containing an OwinStartupAttribute.
- No assembly found containing a Startup or [AssemblyName].Startup class.
To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.

Solution:

It was resolved by adding this code in the startup class [assembly: OwinStartup(typeof(MymvcApp.Models.StartUp))] above the namespace and run the application working fine. To know more detail refer singnalR example mvc.

using Microsoft.Owin;
using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
[assembly: OwinStartup(typeof(MymvcApp.Models.StartUp))]

namespace MymvcApp.Models
{
    public class StartUp
    {
        public void Configuration(IAppBuilder app)
        {
            app.MapSignalR();
        }
    }}