« Previous Next »

Thread: The I/O operation has been aborted because of either a thread exit or an application request

Last post 11-30-2009 7:15 PM by MattDuguid. 37 replies.

Average Rating Rate It (5)

RSS

Page 3 of 3 (38 items) < Previous 1 2 3

Sort Posts:

  • 10-22-2009, 2:58 AM In reply to

    Re: The I/O operation has been aborted because of either a thread exit or an application request

     What is your script trying to do?

    Why are you explicitly using flush?

    Did you check your Label Controls?

  • 10-22-2009, 3:16 AM In reply to

    Re: The I/O operation has been aborted because of either a thread exit or an application request

    Let me clear one thing, in my web application i had create one file as per the user requirment i pass it to user. even i had created one demo application and find the same error at flush statment. In this application i does not use any lable only one button is used. please find my aspx code blow

    ASPX CODE

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

    <title></title> </head>

    <body>

    <form id="form1" runat="server">

    <div>

     

    </div>

    <asp:Button ID="Button1" runat="server" Text="Button" EnableViewState="false" />

    </form> </body>

    </html>

    ASPX.VB CODE

    Imports System.IO

    Partial Class _Default

    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim SendFile As FileInfo

    Dim line_1 As Integer

    Dim FileNameArr() As String

    Dim FileNameWithPath As String

    Dim Response_1 As HttpResponse

    Try

    Response_1 = Me.Response

    FileNameWithPath = "c:\Test.xls"

    SendFile = New FileInfo(FileNameWithPath)

    Response_1.ClearContent()

    Response_1.ClearHeaders()

    Response_1.AppendHeader(
    "Content-Disposition:", "attachment; filename =" + SendFile.Name)Response_1.AppendHeader("Content-Length:", SendFile.Length.ToString())

     

    Response_1.ContentType = "application/vnd.ms-excel"

    Response_1.TransmitFile(FileNameWithPath)

    Response_1.Flush()

    Response_1.End()

    Catch ex As Exception

    If Not TypeOf ex Is System.Threading.ThreadAbortException Then

    Throw New Exception(ex.Message + vbCrLf + "Error occured while Exporting File " + line_1.ToString())

    End If

    Finally

    End Try

    End Sub

    End Class

     You can see that application does not use lable. Even though it will provide me same error.

  • 10-22-2009, 3:26 AM In reply to

    Re: The I/O operation has been aborted because of either a thread exit or an application request

     That is alot of code for something relatively simple

    Response.Clear();
    Response.ContentType = "image/jpeg";
    Response.WriteFile(location);
    Response.End();

     I use this to dynamically write a JPG image.

    location = "path to image relative to my applications root"

    Maybe it will give you some ideas for how you can simplify you code.

  • 10-22-2009, 5:31 AM In reply to

    Re: The I/O operation has been aborted because of either a thread exit or an application request

    Thanks whitesites,

    For kind support, I had found the victime of my code. When i had commented my following line

                Response_1.AppendHeader("Content-Length:", SendFile.Length.ToString())

    And all works.

    But at the same time when i am going to check Headers.count property of Response object then it give me error that IIS Integrity mode required. I does not know how to check this issue.

    Thanks once again.

    Gunjan 

     

     

     

  • 11-27-2009, 6:44 AM In reply to

    • jonesri
    • Not Ranked
    • Joined on 10-23-2006, 6:01 PM
    • Posts 1

    Re: The I/O operation has been aborted because of either a thread exit or an application request

    tmarq:

    Database:  Windows SE
    Bug ID:  275030
    Title: IHttpConnection::IsConnected Returns Invalid Results
    Path:   Windows SE\LongHorn\Server Technologies\IIS\App Server Engine\Web Core

     

    Hi Thomas,

     Do you have an update on this bug?  We are experiencing this problem on our production server at the moment.

    Thanks

    Richard Jones

  • 11-27-2009, 10:17 AM In reply to

    Re: The I/O operation has been aborted because of either a thread exit or an application request

     Post some source code.

    Something that seemed to solve the problem for me was to remove the explicit flush statements, and simplify my code.

  • 11-30-2009, 12:37 PM In reply to

    • tmarq
    • Top 150 Contributor
    • Joined on 06-11-2002, 2:44 PM
    • 42
    • Posts 43

    Re: The I/O operation has been aborted because of either a thread exit or an application request

    I've received several enquiries about the status of Windows SE Bug # 275030, but I do not work in that department and do not know its current status.  To learn more about the fix and how you can obtain it, please contact a Microsoft Support Professional via the "Contact Us" links at http://support.microsoft.com.  Again, as posted earlier, the bug information is:

    Database:  Windows SE
    Bug ID:  275030
    Title: IHttpConnection::IsConnected Returns Invalid Results
    Path:   Windows SE\LongHorn\Server Technologies\IIS\App Server Engine\Web Core

    Thanks,
    Thomas

  • 11-30-2009, 7:15 PM In reply to

    • MattDuguid
    • Top 500 Contributor
    • Joined on 05-25-2008, 11:00 PM
    • New Zealand
    • Posts 21

    Re: The I/O operation has been aborted because of either a thread exit or an application request

    FYI - some stack traces of the error in case this helps shed more light on the issue. I've performed failed request traces during image uploads and watched them bomb out after only a few thousands bytes have been transfered (and these were small files and well within configured limits). We have seen it in two very seperate applications and given other people outside our site have assume its not restircted to us. Again interested in any ideas people have about this one.

    Source: System.Web
    Exception: [System.Web.HttpException] An error occurred while communicating with the remote host. The error code is 0x80070001.
    Method: Void RaiseCommunicationError(Int32, Boolean)
    Stack:
       at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
       at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)
       at System.Web.Hosting.IIS7WorkerRequest.ReadEntityBody(Byte[] buffer, Int32 size)
       at System.Web.HttpRequest.GetEntireRawContent()
       at System.Web.HttpRequest.GetMultipartContent()
       at System.Web.HttpRequest.FillInFormCollection()
       at System.Web.HttpRequest.get_Form()
       at System.Web.HttpRequest.get_HasForm()
       at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
       at System.Web.UI.Page.DeterminePostBackMode()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Source:
    Exception: [System.Runtime.InteropServices.COMException] Incorrect function. (Exception from HRESULT: 0x80070001)
    Method:
    Stack:


    Source: System.Web
    Exception: [System.Web.HttpException] An error occurred while communicating with the remote host. The error code is 0x800703E3.
    Method: Void RaiseCommunicationError(Int32, Boolean)
    Stack:
       at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
       at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)
       at System.Web.Hosting.IIS7WorkerRequest.ReadEntityBody(Byte[] buffer, Int32 size)
       at System.Web.HttpRequest.GetEntireRawContent()
       at System.Web.HttpRequest.GetMultipartContent()
       at System.Web.HttpRequest.FillInFormCollection()
       at System.Web.HttpRequest.get_Form()
       at System.Web.HttpRequest.get_HasForm()
       at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
       at System.Web.UI.Page.DeterminePostBackMode()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Source:
    Exception: [System.Runtime.InteropServices.COMException] The I/O operation has been aborted because of either a thread exit or an application request. (Exception from HRESULT: 0x800703E3)
    Method:
    Stack:

    Matt Duguid
Page 3 of 3 (38 items) < Previous 1 2 3
Microsoft Communities