Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Server cannot set content type after HTTP headers have been sent
Last Post 05/24/2018 6:58 AM by Mike McMinn. 12 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Support Rogue Wave
New Member
New Member
Posts:11


--
10/23/2012 12:00 AM
This is similar if not exactly the same as: http://www.bring2mind.net...v/topic/Default.aspx

I do not see a resolution, so I wanted to open a new thread in case there are differences in implementation.

The error below is being logged 100s of times a day sometimes and junking up the logs. If the error is not valid, perhaps there is a way to disable it?

Running version 6.0.4. The file listed in the error is a valid file and downloads without error.

--- Error ---
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/22/2012 3:40:07 AM
Event time (UTC): 10/22/2012 9:40:07 AM
Event ID: 93a4a12cd553412086773dac39aa2db4
Event sequence: 10546
Event occurrence: 83
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/4/ROOT-1-129953475904496250
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\roguewave.com\
Machine name: ROUG###

Process information:
Process ID: 2164
Process name: w3wp.exe
Account name: IIS APPPOOL\roguewave.com

Exception information:
Exception type: HttpException
Exception message: Server cannot set content type after HTTP headers have been sent.
at System.Web.HttpResponse.set_ContentType(String value)
at System.Web.UI.Page.SetIntrinsics(HttpContext context, Boolean allowAsync)
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)



Request information:
Request URL: http://www.roguewave.com/...PortalId=0&TabId=607
Request path: /DesktopModules/Bring2mind/DMX/Download.aspx
User host address: 161.69.220.1
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\roguewave.com

Thread information:
Thread ID: 19
Thread account name: IIS APPPOOL\roguewave.com
Is impersonating: False
Stack trace: at System.Web.HttpResponse.set_ContentType(String value)
at System.Web.UI.Page.SetIntrinsics(HttpContext context, Boolean allowAsync)
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)


Custom event details:
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/24/2012 5:32 PM
Do you see anything in the UI? I.e. are people complaining of downloads not working? Or is this a search crawler that is trying to access your data?

Peter
Support Rogue Wave
New Member
New Member
Posts:11


--
10/30/2012 7:40 PM
No complaints from end users. No idea if it is a crawler or not. We would however want crawlers to be able to find and search the docs (PDF).
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/31/2012 9:50 AM
The error doesn't give me enough info unfortunately. Maybe there's another error just next to it in the log. If users are not complaining it could be a dud. I'll keep an eye on this anyway and check the code again.

Crawlers should be able to download (and hence index) any document that is visible to "All Users".
Support Rogue Wave
New Member
New Member
Posts:11


--
11/06/2012 4:30 AM
There are no additional errors. These same ones occur every few minutes however. Often back to back. Perhaps on each download, but I have not compared download logs to error logs. This would be difficult however as the download logs do not appear to record time, only date.

Here is another example error, in XML, I believe it is identical:

-
-

1309
3
3
0x80000000000000

3707773
Application
roug414


-
3005
An unhandled exception has occurred.
11/5/2012 6:17:36 PM
11/6/2012 1:17:36 AM
0f1db41a4a014559ac4934185296555a
74933
297
0
/LM/W3SVC/4/ROOT-1-129965796307945000
Full
/
C:\inetpub\roguewave.com\
ROUG414

13896
w3wp.exe
IIS APPPOOL\roguewave.com
HttpException
Server cannot set content type after HTTP headers have been sent. at System.Web.HttpResponse.set_ContentType(String value) at System.Web.UI.Page.SetIntrinsics(HttpContext context, Boolean allowAsync) at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
http://www.roguewave.com/...PortalId=0&TabId=607
/DesktopModules/Bring2mind/DMX/Download.aspx
65.52.111.248

False

IIS APPPOOL\roguewave.com
93
IIS APPPOOL\roguewave.com
False
at System.Web.HttpResponse.set_ContentType(String value) at System.Web.UI.Page.SetIntrinsics(HttpContext context, Boolean allowAsync) at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
11/12/2012 9:10 AM
What I'm curious about is what kind of a request has provoked this response. Is this an end user trying to download something or a crawler trying to access something illegally. Or even more sinister: some other automated process hammering the download to see if anything will come out. It's hard to say without more info.

Peter
Eric Swanzey
New Member
New Member
Posts:74


--
11/12/2012 5:04 PM
I have a site that gets several hundred of these a day. I just compared the DMX_Log entries with the Windows application log entries and IIS log file entries. From what I see it is happening during the normal course of events as users are downloading DMX files, and isn't caused by a spider taking inventory of the site. It also doesn't look to be browser specific because the browser types involved are significantly varied. And it thankfully doesn't result in any sort of on screen error or page bomb thrown to the user.

As an example, when looking at the IIS log I see a user make three requests for a particular DMX download at 14:19:05, 14:21:56, and 14:22:21. When looking at the windows application log, I see the exception (Event code: 3005) thrown only at 14:21:56 for this user. So presumably the second request silently failed.

I attempted to re-create the problem by making repeated requests/download pause and resume/download cancellations against some DMX files and was able to get the error to happen. But so far, am not able to repeat it with any regularity.

Eric
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
11/15/2012 11:27 AM
Thanks Eric. I'm going to investigate ...
Support Rogue Wave
New Member
New Member
Posts:11


--
12/03/2012 10:46 PM
Let us know if there is any additional data we can provide as well. I have not looked into detail the IIS vs. App logs vs. DMX logs yet like Eric has but it does not appear to be sinister in nature.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
12/04/2012 12:12 PM
I haven't been able to do anything about this. I can't reproduce it so I can't determine the cause. I went through the code very carefully, but all errors should be caught silently and not lead to an error message being emitted after the headers have been sent. This was something I once saw years ago as the cause of this error message. But as far as I can tell, this has been wired up correctly. Keep in mind that it is possible the error is at the framework level. DMX only controls so much. It hands off to DNN at various places. One can't exclude an error there. For now I can't find a way to narrow this down further.

Peter
Support Rogue Wave
New Member
New Member
Posts:11


--
12/31/2012 3:10 AM
Thanks Peter for the continued effort. I believe I may have found the error, but its difficult to prove. There are several PDF files in the DMX repository with internal bad relative links. Clicking on the links expects to find the files in the Bring2Mind directory in certain instances. I believe this is browser configuration dependent. The 404 errors seem to be logged against where the PDF was downloaded from/is being served from.

Ideally this would be resolved by cleaning up those files, but this isn't likely to occur. There however may be a way to configure DNN/URLMaster to ignore/redirect these bad links pointing to the Brind2Mind directory elsewhere.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
01/03/2013 3:42 PM
Thanks for the update. The tricky bit for DMX concerning responses to non-existent items is that it *should* respond with a 404. This is the response which is the most accurate and robust with all kinds of client software.

Peter
Mike McMinn
New Member
New Member
Posts:2


--
05/24/2018 6:58 AM
Hi Peter,

We are trying to fix these issue, we have around 500 HttpException every day. Clients don't complain if there something wrong viewing the file or downloading. We just would like to remove the errors in our logs. I hope you have already figured it out why this one happening.

Kind Regards,

MyHub Team
You are not authorized to post a reply.