i have a web forms app (deployed to azure) that was created using vs 2013 update 2. i have also injected elmah into the app. now it seems something is wrong with the way authentification works: _sometimes_ i get the following exception notification from
elmah:
System.Web.HttpException: Server cannot append header
after HTTP headers have been sent
System.Web.HttpException (0x80004005): Server cannot append header after HTTP headers have been sent.
at System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace)
at System.Web.HttpHeaderCollection.Set(String name, String value)
at Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders.Set(String key, String[] values)
at Microsoft.Owin.Host.SystemWeb.CallHeaders.AspNetResponseHeaders.set_Item(String key, String[] value)
at Microsoft.Owin.Infrastructure.OwinHelpers.SetHeaderUnmodified(IDictionary`2 headers, String key, String[] values)
at Microsoft.Owin.Infrastructure.OwinHelpers.AppendHeaderUnmodified(IDictionary`2 headers, String key, String[] values)
at Microsoft.Owin.HeaderDictionary.AppendValues(String key, String[] values)
at Microsoft.Owin.ResponseCookieCollection.Append(String key, String value, CookieOptions options)
at Microsoft.Owin.Security.Cookies.CookieAuthenticationHandler.<ApplyResponseGrantAsync>d__b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseCoreAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<TeardownAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I _think_ this happens when i'm logged into the site (into a protected directory, auth with forms), and close the browser or move to a different site. any ideas what would be causing this or what to do to get rid of this?
According to your description and the error message, please refer to make sure the version of the DNN. So far as I know, this error will happen with some compresssion/whitespace filter settings in DNN 4.4.x, this has been corrected in DNN 4.5. So please
refor to upgrade the version.
Hope it's useful for you.
Best Regards,
Michelle Ge
We are trying to better understand customer views on social support experience. Click HERE to participate the survey. Thanks!
what is "DNN" ? My application is basically just the application that vs 2013 update 2 generated automatically for me with some minor changes... (plus elmah). Incase you refer the "DotNetNuke" - i'm not using this. As i said, this is just the barebones stuff
vs generated...
In case you haven't found the cause yet, I recently ran into this as well, and it appears to be due to an issue within Katana that should be fixed in a future release:
Member
1 Points
11 Posts
Server cannot append header after HTTP headers have been sent.
Jun 11, 2014 09:18 AM|thomas woelfer|LINK
hi.
i have a web forms app (deployed to azure) that was created using vs 2013 update 2. i have also injected elmah into the app. now it seems something is wrong with the way authentification works: _sometimes_ i get the following exception notification from elmah:
System.Web.HttpException: Server cannot append header
after HTTP headers have been sent
-thomas woelfer
All-Star
18232 Points
2199 Posts
Re: Server cannot append header after HTTP headers have been sent.
Jun 12, 2014 03:01 AM|Michelle Ge - MSFT|LINK
Hi,
According to your description and the error message, please refer to make sure the version of the DNN. So far as I know, this error will happen with some compresssion/whitespace filter settings in DNN 4.4.x, this has been corrected in DNN 4.5. So please refor to upgrade the version.
Hope it's useful for you.
Best Regards,
Michelle Ge
Member
1 Points
11 Posts
Re: Server cannot append header after HTTP headers have been sent.
Jun 12, 2014 04:37 AM|thomas woelfer|LINK
Michelle,
what is "DNN" ? My application is basically just the application that vs 2013 update 2 generated automatically for me with some minor changes... (plus elmah). Incase you refer the "DotNetNuke" - i'm not using this. As i said, this is just the barebones stuff vs generated...
WM_THX
-thomas woelfer
Member
10 Points
1 Post
Re: Server cannot append header after HTTP headers have been sent.
Aug 04, 2014 12:42 PM|GP|LINK
In case you haven't found the cause yet, I recently ran into this as well, and it appears to be due to an issue within Katana that should be fixed in a future release:
http://katanaproject.codeplex.com/discussions/540202