>>>我使用 HttpWebRequest 进行异步请from which server? are you also controlling the server? does it fail on all URLs? if it is your own server, make sure the proper headers are being sent back, for example, CONTENT_LENGTH header,  see a similar problem at
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=621fd525.0306131459.22d782d0%40posting.google.com

解决方案 »

  1.   

    A lot of thanks to Saucer.>>>are you also controlling the server?
    No, the server is a remote third party IIS server.>>>does it fail on all URLs?
    It works perfectly on most of the URLS and breaks suddenly on certain URL. I can't find anything wrong with the failed URL.The most frustrating part is, when the exact error occurs, a 'System.ExecutionEngineException' exception also raised, the exception then take down the whole application and ask me for a JIT debug.
      

  2.   

    是不是应为网络状况不好或者服务器繁忙
    错误不是可以catch吗,catch之后重置连接看看
      

  3.   

    lyrixliu(WHO.NET) ,'System.ExecutionEngineException' 错误捕捉不到,程序突然就冒出这么个错误。
      

  4.   

    >>>certain URLhave you tried to read synchronously on thise URLs? also use the ieHTTPHeaders tool I mentioned to see if there are anything wrong with the headershttp://blog.joycode.com/saucer/posts/19685.aspxalso seeFIX: You receive a "Fatal execution engine error" error message in Windows Server 2003
    http://support.microsoft.com/default.aspx?scid=kb;en-us;824210Managing Unhandled Exceptions in .NET
    http://www.codeproject.com/dotnet/unhandledexceptions.asp
      

  5.   

    Thanks to Saucer.It's on my fault not explaining the error messages clearly.
    Let me show you the detail.My application is a screen scraper which request ranged urls with multi threads.
    The request life cycle is the way a typical async request is,Request
    BeginGetResponse
    EndGetResponse
    ResponseStream BeginRead
    ResponseStream EndRead
    and so on...I set up try..catch blocks in every places to catch the exception, as mater of fact, "Unable to read data from the transport connection" is what the catch block caught when bad url or bad server response encountered.The problem is when exceptions above caught one or more times, suddenly the Just-In-Time debugging window shows up.Here is the message found on JIT debugging window,"an exception 'system.executionengineexception' has occurred"when "debug" button clicked,this message poped up,
    "An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll"In VS.NET 2003 debugging enviroment, the break point falls, some times on "static void Main(){}", some times on "WebRequest.Create()", some times on who knows where.I guess a unhandled fatal error which can't be caught occurs somewhere.
      

  6.   

    各种可能都考虑过了,仍然没有办法,很多国外的论坛上有说法是 HttpWebResquest 的一个 BUG,但微软并没有提到过,等 SP1 出来再看看吧,难道要等 .net 2.0?
    结帐。