在IIS Express中测试SignalR应用程序

Set*_* IK 6 asp.net-mvc iis-express signalr

大家好,我正在使用Visual Studio 2012,并开发了一个简单的应用程序,仅用于审查目的

但是我被困了,因为当我尝试预览应用程序时,我收到以下错误消息

[PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.]
   System.Web.HttpResponse.get_Headers() +9681446
   System.Web.HttpResponseWrapper.get_Headers() +9
   Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +309
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application) +246
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application) +15
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) +288
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +285
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Run Code Online (Sandbox Code Playgroud)

关于如何解决这个问题的任何想法

Gus*_*nta 10

选择您的Web应用程序项目,在Solution Explorer下面有一个Properties窗口.选择"开发服务器">"ManagedPipelineMode">"集成"

  • 在VS 2012中不可用.因此,您可以通过右键单击项目来更改所使用的服务器,选择属性,单击Web选项卡,然后在服务器部分下选择"使用本地IIS Web服务器". (6认同)
  • 我正在使用Visual Studio 2012.我没有看到这个选项 (3认同)
  • 在VS 2012网站(非应用程序)中,我可以直接单击我的项目和"使用本地IIS Web服务器". (2认同)