updated;
gets an error: This operation requires IIS integrated pipeline mode.
   at System.Web.HttpResponse.get_Headers()
   at System.Web.HttpResponseWrapper.get_Headers()
   at Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders..ctor(HttpResponseBase response)
   at Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment()
   at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application)
   at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application)
   at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata)
   at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)