如何获得IIS承认OWIN启动类? [英] How to get IIS to recognize OWIN startup class?

查看:159
本文介绍了如何获得IIS承认OWIN启动类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我OWIN Web服务运行精美在Visual Studio 2013年,但是当我把它发布到一个真正的IIS站点,它充当如果在启动类的配置方法尚未运行。我可以做正常之类的浏览到该应用程序,看到的目录结构,但没有什么据称是建立与IAppBuilder是功能性的。例如,我得到一个404.0错误,当我浏览到设立于启动发出的OAuth2承载令牌的网址。 。这是因为如果Startup.Configuration(IAppBuilder APP)从未运行



我使用了 [汇编:OwinStartup(typeof运算(MyNamespacedStartupClass)) ] 属性来指定启动类。



我用过的NuGet,让每我见过的指令都Microsoft.Owin.Host.SystemWeb和Microsoft.Owin.Diagnostics,但是这不会使一个区别。



更多的我有什么做的?


解决方案

  1. 确保您的应用程序池在V4.0集成模式。

  2. 确保您有仓放置Microsoft.Owin.Host.SystemWeb(我看你已经安装了它) - 只要确保它也是在bin文件夹。



这篇文章会对一个OWIN中间件综合管线如何运行的详细信息。


My OWIN web service runs beautifully in Visual Studio 2013, but when I publish it to a real IIS site, it acts as if the Configuration method in the startup class has not been run. I can do "normal" things like browse to the app and see the directory structure, but nothing that was supposedly set up with the IAppBuilder is functional. For example, I get a 404.0 error when I browse to a URL that was set up in Startup to issue an OAuth2 bearer token. It's as if Startup.Configuration(IAppBuilder app) was never run.

I'm using the [assembly: OwinStartup(typeof(MyNamespacedStartupClass))] attribute to designate the startup class.

I've used NuGet to get both Microsoft.Owin.Host.SystemWeb and Microsoft.Owin.Diagnostics per instructions I've seen, but that doesn't make a difference.

What more do I have to do?

解决方案

  1. Make sure your app pool is in v4.0 integrated mode.
  2. Make sure you have bin placed Microsoft.Owin.Host.SystemWeb (I see you have installed it) - Just make sure its also in the bin folder.

This article will have more information on how an OWIN middleware runs on Integrated pipeline.

这篇关于如何获得IIS承认OWIN启动类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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