Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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