views:

647

answers:

2

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)?

A: 

You can install your site to the local IIS server instead of using Visual Studio's built in server.

Darin Dimitrov
This may be what I have to do. Unfortunately, I don't know much about IIS. Guess it's time to learn.
Slapout
In the properties of your web application you can change the web server being used to IIS.
Darin Dimitrov
A: 

Have someone else point at your box and close the browser while you run/debug the server code on your box. This will allow you to have two separate host and client machines and will also allow you to potentially debug the issue if need be.

Andrew Hare
I'm not sure how I do that if the ASP/Visual Studio built-in development server doesn't allow remote connections.
Slapout