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

  •  08-06-2010, 4:54 AM

    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.

     
     
View Complete Thread