Quantcast
Channel: Troubleshooting
Viewing all articles
Browse latest Browse all 1814

An error occurred while communicating with the remote host: This value is write-only

$
0
0

The Problem
We have an in-production application hosted in the following environment:

Windows 2008 R2, x64
IIS 7.5
ASP.NET 3.5 SP1

We've long had a mechanism in place in ASP.NET to log errors. Starting earlier this week, errors of the following type have been popping up a couple times a day. Previously, we had not seen these types of errors, and this application has been in use for many years. Moreover, there have been no platform or software upgrades (that I know of) over the past several months. Finally, the errors seem intermittent. They are from a page that is hit many, many times a day, yet we're only seeing a few of these errors per day. I, nor anyone else on the development team, have been able to repro.

Exception of type 'System.Web.HttpUnhandledException' was thrown.
     ---> System.Web.HttpException: An error occurred while communicating with the remote host. The error code is 0x800703E3.
     ---> System.Runtime.InteropServices.COMException (0x800703E3): This value is write-only.

and:

Exception of type 'System.Web.HttpUnhandledException' was thrown.
     ---> System.Web.HttpException: An error occurred while communicating with the remote host. The error code is 0x80070040.
     ---> System.Runtime.InteropServices.COMException (0x80070040): This value is write-only.

Note that the inner error message on both says, "This value is write-only," and the outer error message is "occurred while communicating with the remote host," although the actual error code is sometimes 0x800703E3 and other times is 0x80070040.

These errors are emanating from a single ASP.NET page that programmatically creates a Crystal Report, converts it to PDF, and then streams it down to the client:

Dim oStream as New BinaryReader(methodToExportCRtoStream)

If Response.IsClientConnected Then
    Response.Clear()
    Response.AddHeader("Content-Length", oStream.BaseStream.Length)
    Response.ContentType = "application/pdf"
    Response.BinaryWrite(oStream.ReadBytes(oStream.BaseStream.Length))
    Response.Flush()
    Response.Close()
End If

The error we are receiving is originating from the Response.Flush.

Any ideas or suggestions? My hope is that this error indicates that the client has disconnected before the Flush completes and that there is no error displayed to the end user (no user has yet complained of an error, but they rarely do). The "This value is write-only" part is what intrigued me, though, I don't think I've ever seen that and am a loss as to what it means. Is it referring to the Response stream? Is something deep within the bowels of IIS trying to read from it, by chance?

Thanks!

Viewing all articles
Browse latest Browse all 1814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>