【问题标题】:Does Cassini DevServer support Integrated Pipeline mode?Cassini DevServer 是否支持集成管道模式?
【发布时间】:2014-03-03 01:13:40
【问题描述】:

这是我在网上找不到的。

我们有一个使用 SignalR 的 Web 应用程序,它需要 Owin 和 IIS 集成管道模式。当我在 Cassini Dev Server 上运行我们的 Web 应用程序时,我收到以下错误:

[PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.]
   System.Web.HttpResponse.get_Headers() +214
   Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders..ctor(HttpResponseBase response) +37
   Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +492
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application) +263
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application) +19
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) +462
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +556
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

在自动测试中运行 IIS Express 和其他替代方法是 PITA。

【问题讨论】:

  • 参见:stackoverflow.com/questions/716049/… 基本上,这可能需要重写 cassini 以直接与 ASP.Net 集成(就像 IIS 一样),而不是将其视为外部组件。
  • 这很奇怪。现在,突然之间,devserver 与我的网站一起工作。
  • 也许您的 web.config 或其他配置选项已针对网站、SignalR 或 Owin 进行了更改?
  • 遇到同样的问题,你知道你是如何让它工作的吗?
  • 有同样的问题 - 我通过从 github/codeplex 下载 owin/signalR 项目并注释掉 2-3 代码行来解决它。现在似乎工作正常

标签: cassini-dev


【解决方案1】:

CassiniDev 不支持集成管道模式。如果您遇到此错误,您可能需要切换到 IISExpress。我通过使用here 发布的解决方案做到了这一点。

【讨论】:

    猜你喜欢
    • 2020-04-06
    • 2015-03-26
    • 2023-03-17
    • 1970-01-01
    • 1970-01-01
    • 2019-01-08
    • 1970-01-01
    • 2021-12-12
    • 1970-01-01
    相关资源
    最近更新 更多