Source: System.Web Mensagem: Servidor não pode anexar um cabeçalho após os cabeçalhos HTTP terem sido enviados. Stack Trace: em System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace) em System.Web.HttpHeaderCollection.Set(String name, String value) em Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders.Set(String key, String[] values) em Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders.set_Item(String key, String[] value) em Microsoft.Owin.Infrastructure.OwinHelpers.SetHeaderUnmodified(IDictionary`2 headers, String key, String[] values) em Microsoft.Owin.Infrastructure.OwinHelpers.AppendHeaderUnmodified(IDictionary`2 headers, String key, String[] values) em Microsoft.Owin.HeaderDictionary.AppendValues(String key, String[] values) em Microsoft.Owin.Infrastructure.ChunkingCookieManager.AppendResponseCookie(IOwinContext context, String key, String value, CookieOptions options) em Microsoft.Owin.Security.Cookies.CookieAuthenticationHandler.<ApplyResponseGrantAsync>d__13.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseCoreAsync>d__40.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseAsync>d__39.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<TeardownAsync>d__34.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__7.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) em Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.<DoFinalWork>d__12.MoveNext() --- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada --- em Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) em Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork(IAsyncResult ar) em System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() em System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) em System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Environment: IIS-07