SignalR和SelfHosting ASPNET应用 [英] SignalR and SelfHosting ASPNet app

查看:183
本文介绍了SignalR和SelfHosting ASPNET应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用SignalR的web应用联系学校网络,它在IIS下正常工作。

I have an ASPnet webapplication that uses SignalR, it works fine under IIS.

当我尝试自我与主机的System.Web.ApplicationHost.CreateApplicationHost web应用ASP.NET,该signalR功能已经一去不复返了。

When I try to self host the ASP.NET webapplication with System.Web.ApplicationHost.CreateApplicationHost, The signalR functionality is gone.

从调试,我看到OWin启动类是从来没有击中。

From debugging, I see that the OWin Startup class is never hit.

有没有人有一个线索,为什么?据我了解,在CreateApplicationHost只是托管IIS以外的应用,但它仍然通过ASP.NET管道中运行,所以,我不明白为什么Owin启动和SignalR不会工作。

Does anyone have a clue why? From what I understand, the CreateApplicationHost is just hosting the application outside of IIS, but it still runs through the ASP.NET pipeline, So, I don't understand why Owin startup and SignalR wont work.

推荐答案

在ASP.NET中承载的,基于OWIN的应用程序需要集成的管线的IIS。 CreateApplicationHost部队使用ASP.NET经典管道。

When hosted inside of ASP.NET, OWIN-based applications require the IIS integrated pipeline. CreateApplicationHost forces use of the ASP.NET classic pipeline.

如果您想自主机上,使用的HttpListener基于OWIN的主机,而不是直接试图自托管ASP.NET。

If you want to self-host, use the HttpListener-based OWIN host rather than trying to self-host ASP.NET directly.

这篇关于SignalR和SelfHosting ASPNET应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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