Azure 应用服务上带有 OWIN“SystemWeb"的 Web API 应用 [英] Web API app with OWIN 'SystemWeb' on Azure App Service

查看:36
本文介绍了Azure 应用服务上带有 OWIN“SystemWeb"的 Web API 应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建在 .NET 中使用 Identity 2.1.0 框架的应用程序.我在 Visual Studio 2015 中以 Empty Web App(模板)的形式开始了项目.现在,我在我的项目中使用 Microsoft.AspNet.WebApi.OwinMicrosoft.Owin.Host.SystemWeb NuGet 包.我了解 OWIN 是一种规范,旨在避免单一框架并指定较小的应用程序组件如何与服务器交互.但是,我需要部署到 Azure 应用服务.

I am creating app which uses Identity 2.1.0 framework in .NET. I started project in Visual Studio 2015 as Empty Web App (template). Now, I use Microsoft.AspNet.WebApi.Owin, and also Microsoft.Owin.Host.SystemWeb NuGet packages in my project. I understand that OWIN is a specification made to avoid monolithic frameworks and to specify how smaller application components interact with servers. However, I have requirement to deploy to Azure App Services.

我发现人们将 OWIN Web Api 应用程序部署为自托管到 Azure 云服务辅助角色的示例(博客).但我不想要这个,因为我不使用云服务.

I have found examples (blogs) where people deploy OWIN Web Api app as self-hosted to the Azure Cloud Services worker role. But I don't want this, as I don't use Cloud Service.

由于我使用的是 Microsoft.Owin.Host.SystemWeb,我是否能够将其部署到 Azure App 服务(我假设它管理内部 IIS 实例)?

Since I am using Microsoft.Owin.Host.SystemWeb, am I going to be able to deploy this to Azure App service (which I assume manages internal IIS instance) ?

.NET 生态系统新手在这里 - 所以请原谅我的问题中任何可能的冗余.

.NET ecosystem newbie here - so please excuse me for any possible redundancies in the question.

推荐答案

Microsoft.Owin.Host.SystemWeb 专为托管在 IIS 中而设计,所有 Azure App Service Web 应用都托管在 IIS 中,因此这正是您想要的(事实上,自托管可能不适用于 Azure 应用服务).

Microsoft.Owin.Host.SystemWeb is designed for hosting in IIS and all Azure App Service web apps are hosted in IIS, so this is exactly what you want (In fact, self-hosting likely won't work with Azure App Service).

这篇关于Azure 应用服务上带有 OWIN“SystemWeb"的 Web API 应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆