Correct Default Scoped Lifetyle for IIS Hosted application using MVC, Web API, and Owin #381

Open
rbernard42 opened this Issue Feb 17, 2017 · 1 comment

Projects

None yet

2 participants

@rbernard42

We have an MVC / Web API application that is hosted on IIS which implements an OAuth 2.0 Authorization Server using OWIN OAuth middleware and bearer tokens for access to the application.

The Simple Injector documentation recommends using WebApiRequestLifestyle for applications that solely consist of a Web API and use WebRequestLifestyle for applications that contain a mixture of Web API and MVC.

At this time the application does not need access to the current IOwinContext and uses IDependencyResolver to get the service that is required by our custom OAuthAuthorizationServerProvider.

Is it ok to use the WebRequestLifestyle when an IIS hosted application consists of MVC, Web API, and OWIN?

@dotnetjunkie
Collaborator

Is it ok to use the WebRequestLifestyle when an IIS hosted application consists of MVC, Web API, and OWIN?

Yes it is. You can use the WebRequestLifestyle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment