No assembly found containing an OwinStartupAttribute. error in mvc project

Hi, I have just created a project using Visual Studio 2015 & selected MVC template, but When I tried to build the project and executed it in the browser, I got the error as below

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.

Here is the Image of the error


How can I resolve this error?What did I miss?


Asked by:- Vinnu
: 3515 At:- 3/12/2018 12:45:37 PM
C# mvc owin

1 Answers
profileImage Answered by:- neena

1. Check if there is Startup.cs file in the root folder of your project, if not please create startup.cs in the root of propject like below example

public class Startup
    //For more information on how to configure your application,
    public void ConfigureServices(IServiceCollection services)

    public void Configure(IApplicationBuilder app)

2. OR add the key owin:AutomaticAppStartup set to false in your appSettings


   <addkey="owin:AutomaticAppStartup" value=“false“ />


One of the above solutions should solve your issue

At:- 3/13/2018 2:15:49 PM Updated at:- 3/13/2018 2:16:30 PM
First solution worked for, I checked my solution explorer, I was missing Startup.cs file, so created it as explained by you and it worked, so I didn't try 2nd solution, thanks 0
By : Vinnu - at :- 3/16/2018 12:14:39 PM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use