Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

olu adesina
olu adesina
23,007 Points

Identity/owin: where is the app parameter coming from in our startup Configuration method

When Configuring the Identity OWIN Middleware Component we added a startup class which takes a parameter of app of type IAppBuilder

public class Startup
{
    public void Configuration(IAppBuilder app)
    {
    }
}

I want to understand where this parameter is coming from? Is it Owin working in the back ground and does it represent our application

Steven Parker

1 Answer

James Churchill
STAFF
James Churchill
Treehouse Teacher

Olu,

Yes, the IAppBuilder instance is being provided at runtime by OWIN (and Katana). The IAppBuilder interface is used to add and configure middleware for the request pipeline.

For more information about OWIN and Katana see: https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/an-overview-of-project-katana

It's worth noting that the concepts introduced by OWIN and Katana are now part of ASP.NET Core. If you review the documentation for ASP.NET Core middleware (see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-2.1) you'll see a lot of similarities to middleware in OWIN.

I hope this helps! And thanks for being a Treehouse student :)

~James

olu adesina
olu adesina
23,007 Points

Thanks for taking the timeout to answer this question. i'm very grateful