Reputation: 802
I have a project that does the authorization, and works great. When I try to add another project, and add a reference to it, when kicking off the project, locally or on IIS, the Startup.cs no longer kicks off. I compared the two projects, and are using the same dll's if they reference the same dll's. They are also set up to use the same version of .NET (4.5.1).
I also tried adding the app setting to point to the setup, in many different ways listed on another site.
Can anyone think of anything I may be missing to stop this from happening?
EDIT - Here are the dlls
The owin based authority project of course is a web project. The one that breaks it is a class library. Here are the packages of the web project
<package id="elmah" version="1.2.2" targetFramework="net45" />
<package id="Elmah.Contrib.Mvc" version="2.1" targetFramework="net45" />
<package id="Elmah.Contrib.WebApi" version="1.0.9.0" targetFramework="net45" />
<package id="elmah.corelibrary" version="1.2.2" targetFramework="net45" />
<package id="Elmah.MVC" version="2.1.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OData" version="5.5.1" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebHelpers" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages.Data" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages.WebData" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net451" />
<package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net451" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net451" />
<package id="Microsoft.Owin.Cors" version="3.0.1" targetFramework="net451" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net451" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net451" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net451" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net451" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net451" />
<package id="Owin" version="1.0" targetFramework="net451" />
<package id="structuremap" version="3.1.5.154" targetFramework="net451" />
<package id="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry" version="4.5.1" targetFramework="net45" />
<package id="System.Spatial" version="5.6.4" targetFramework="net451" />
<package id="WebApiContrib.Formatting.Jsonp" version="3.0.0.0" targetFramework="net45" />
And here are the class library dll's....
<package id="elmah" version="1.2.2" targetFramework="net45" />
<package id="elmah.corelibrary" version="1.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OData" version="5.5.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="RhinoMocks" version="3.6.1" targetFramework="net45" />
<package id="structuremap" version="3.1.4.143" targetFramework="net45" />
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
<package id="WebApiContrib.Formatting.Jsonp" version="3.0.0.0" targetFramework="net45" />
Upvotes: 0
Views: 312
Reputation: 802
It is a difference in versions. One version the aspnet.identity changed from 1 to 2..and interfaces were different. Had to extend again and move code around, but I do appreciate your help.
Upvotes: 1
Reputation: 6230
I doubt it has anything to do with your class library project. Something in the solution is changing when you add new class library project and referencing
Try following.
http://blogs.msdn.com/b/praburaj/archive/2013/12/02/owin-startup-class-not-detected.aspx
Does it show any error in Output window of VS?
Also just make sure that the Webproject is startup project, in case you are using F5 to run the solution.
see following for details about startup class
http://www.asp.net/aspnet/overview/owin-and-katana/owin-startup-class-detection
Upvotes: 0