Search code examples
asp.net-identity-2

What does the owin:AppStartup key in the ASP.Net Identity Samples Web.Config do?


I am using the code from the

Microsoft ASP.NET Identity Samples 2.1.0-alpha1

There's one area of the code that I do not understand and that is the web.config entry below:

<appSettings>
  <add key="owin:AppStartup" value="IdentitySample.Startup,WebApplication3" />

My code does work without this but I am wondering if I should have something like this.

Can anyone explain to me what this does?


Solution

  • Basically this tells OWIN what method to execute on the application start. And IdentitySample.Startup method contains code that bootstraps your application.

    You can specify this class via an attribute [assembly: OwinStartup(typeof(StartupDemo.TestStartup))] if you wish.

    But this one is web.config so it can be changed for different deployment strategies without recompiling the project.

    See more details in documentation.