Server cannot set content type after HTTP headers have been sent.

Last post 08-15-2010, 10:39 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  08-06-2010, 4:54 AM 63162

    Server cannot set content type after HTTP headers have been sent.

    Hello,
     
    We've been using AjaxUploader since some time now and haven't had any major problems with it, but today a customer had the following problem:
    On uploading a 7MB file, the uploader stopped at 3% and showed an alert message saying: 
    "Flash: the upload task is interrupted! io Error #2038"
    He tried this several times, under Firefox and IE, same problem.
    We are using version 3.0.0.0 of CuteWebUIAjaxUploader.dll.
     On a later attempt, the message became:
     
    Flash: The upload task is interrupted! io Error #2038
    Server side error : System.Exception: Upload data transfer expired
      at CuteWebUI.a.a(HttpContext A_0, HttpWorkerRequest A_1, MemoryStream A_2, FileStream A_3,
    String& A_4)
      at CuteWebUI.a.b(HttpWorkerRequest A_0)
      at CuteWebUI.UploadModule.d(HttpContext A_0)
     
     
    I checked the Event Viewer on the server and discovered that his attempts resulted in a HttpException every time, with the following message:
    "Server cannot set content type after HTTP headers have been sent. "
     
    Could you help us solve this issue? Please note that we can't reproduce this issue, it only happens on a customer's machine, so every time I want to test something, I have to contact the customer and ask.
     
    Thank you.
     
    Below is the full log of this system Event that gets thrown.
     

    Event Type:      Warning

    Event Source:   ASP.NET 2.0.50727.0

    Event Category:           Web Event

    Event ID:         1309

    Date:                6/08/2010

    Time:               10:53:35

    User:                N/A

    Computer:        FRONTLINE

    Description:

    Event code: 3005

    Event message: An unhandled exception has occurred.

    Event time: 06/08/2010 10:53:35

    Event time (UTC): 06/08/2010 08:53:35

    Event ID: 764fbe8bb1bd4449afb4ea58a128ba3a

    Event sequence: 19

    Event occurrence: 4

    Event detail code: 0

     

    Application information:

        Application domain: /LM/W3SVC/1/Root/ImageCatcher-2-129255567008906250

        Trust level: Full

        Application Virtual Path: /ImageCatcher

        Application Path: c:\inetpub\wwwroot\ImageCatcher\

        Machine name: FRONTLINE

     

    Process information:

        Process ID: 4972

        Process name: aspnet_wp.exe

        Account name: FRONTLINE\ASPNET

     

    Exception information:

        Exception type: HttpException

        Exception message: Server cannot set content type after HTTP headers have been sent.

     

    Request information:

        Request URL: http://upload.authentic.be/ImageCatcher/Default.aspx?sessionID=URaJXjZjcsjpoa&language=french&module=prefix&UseUploadModule=Dynamic&_Namespace=CuteWebUI&_UploadID=Uploader1Image_1281084643460_1&_UploadControlID=Uploader1&ContextValue=!3wEWAQUPRDovVXBsb2FkZXJUZW1wxF!3DDmC1pTyUawMoirGavy2xts4!2&_Addon=upload&_AddonGuid=657AB9C7-0E94-2316-8EF5-B132ED1E24B0

        Request path: /ImageCatcher/Default.aspx

        User host address: 109.128.127.225

        User: 

        Is authenticated: False

        Authentication Type: 

        Thread account name: FRONTLINE\ASPNET

     

    Thread information:

        Thread ID: 11

        Thread account name: FRONTLINE\ASPNET

        Is impersonating: False

        Stack trace:    at System.Web.HttpResponse.set_ContentType(String value)

       at CuteWebUI.UploadModule.d(HttpContext A_0)

       at CuteWebUI.UploadModule.l(HttpContext A_0)

       at CuteWebUI.UploadModule.a(Object A_0, EventArgs A_1, AsyncCallback A_2, Object A_3)

       at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

     

    Custom event details:

     

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     
     
  •  08-09-2010, 10:14 AM 63261 in reply to 63162

    Re: Server cannot set content type after HTTP headers have been sent.

    dyte,
     
    I think we have a solution to this issue and the latest build of uploader should work for this situation.
     
    Please download the latest build then try again.

    Demo:
     
     
    Keep me posted

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-11-2010, 3:09 AM 63318 in reply to 63261

    Re: Server cannot set content type after HTTP headers have been sent.

    Hi,
     
    I installed the latest version of AjaxUploader and contacted the customer to try again.
    Unfortunately the problem persist. The customer said:
     
    It hangs with the same 2038 error ... (I tried several jpg files)
    It seems related to the filesize, because the percentage stops somewhere between 1 and 3 percent depending on the filesize. 
     
    I checked the event  viewer on the server and just like before, his attempts generated the error message:
    Server cannot set content type after HTTP headers have been sent. (see log in original post)
     
    Any ideas?
     
  •  08-15-2010, 10:39 PM 63411 in reply to 63162

    Re: Server cannot set content type after HTTP headers have been sent.

    Hi,
     
    We have improved this issue again.
     
    Now it shall not create the "server cannot set content type after HTTP header" error.
     
    But your customer may still not able to upload, and may get a new message.
     
    Please let your customer try again , and keep me posted.
     
    Regards,
    Terry
     
View as RSS news feed in XML