We have an ASP.NET website in production that generates a report and sends it to the user's browser as a PDF file. Our error reporting is showing that we are getting a lot of this exception:
System.Web.HttpException: The remote host closed the connection. The error code is 0x80072746.
These appear to be caused by the user closing their browser before the report generation is complete. I've added code to deal with this error, but I can't find a way to test it. The ASP.NET development server that runs when you test in Visual Studio doesn't allow remote connections so I can't go to another machine and try it. And closing the browser when running the website on my machine doesn't produce the exception (presumably because I'm not a "remote host").
So, I guess my question is, how do I test my new error handling code (without pushing it to a live server)?