VS2010 Getting Started with Owin and Katana

Source: Internet
Author: User
Tags stack trace

Reference Address: Http://www.asp.net/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana

1 Creating an empty ASP.

2 Installing the ADD NuGet Packages management tool

3 Open NuGet console name management program, install Microsoft.owin 2.1.0

Because VS2010 is used, the version is the 4.0 framework, so install 2.1.0, currently the latest is 3.0

Execute command: Install-package microsoft.owin.host.systemweb-version 2.1.0

4 Add a startup class. Add an empty class, name Startup1, and then add the following code.

Using system;using system.threading.tasks;using microsoft.owin;using Owin; [Assembly:owinstartup (typeof (Owinapp.startup1))]namespace owinapp{public    class Startup1    {public        void Configuration (Iappbuilder app)        {          app. Run (context =          {              context. Response.ContentType = "Text/plain";              Return to context. Response.writeasync ("Hello, World");          });            

After adding the solution is as follows:

5 Press F5 to run, the following error occurred:

This operation requires the use of IIS integrated pipeline mode. Description:An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code.
Exception Details:System.platformnotsupportedexception: This operation requires the use of IIS integrated pipeline mode.
Source Error:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

Stack trace:

  [platformnotsupportedexception: This operation requires the use of IIS integrated pipeline mode. ] System.Web.HttpResponse.get_Headers () +9740986 System.Web.HttpResponseWrapper.get_Headers () +9 Microsoft.Owin.Hos T.systemweb.callheaders.aspnetresponseheaders.   ctor (httpresponsebase response) +72 Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment () +434 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment (   HttpApplication application) +303 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext (   HttpApplication application) +65 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent (Object sender,   EventArgs E, AsyncCallback cb, Object Extradata) +622   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (+285) System.Web.HttpApplication.ExecuteStep (IExecutionStep step, boolean& completedsynchronously) +155  
 
未完待续。

VS2010 Getting Started with Owin and Katana

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.