1

I have a web development server running on my Windows 7 machine. I'm working on a feature where the page brings up a warning message should the user's connection with the internet go away.

Thus far, it seems to be working; when I kill the server, the page behaves appropriately. However, I'd like to see what happens if the connection is severed temporarily but the server is still running. Bouncing the server forces the user to log back in; I want to know if they can proceed as expected should the connection cut out intermittently.

Unfortunately, I don't know how to achieve this. Blocking localhost:8080 on the Windows firewall doesn't do any good, as it doesn't process localhost. Is there anything else I could do to simulate a network outage, other than go through the bother of actually running this on another computer?

2 Answers 2

3

use fiddler http proxy to kill the traffic temporarily

4
  • I've downloaded it, and it looks like a nifty tool, but I'm not clear on how I can use it to kill traffic. Could you please advise?
    – BlairHippo
    Feb 1, 2013 at 21:09
  • 2
    ... with the content-blocking extension (fiddler2.com/fiddler2/extensions.asp). That did it; thank you!
    – BlairHippo
    Feb 1, 2013 at 21:17
  • head to http://www.fiddlertool.com/fiddler/dev/scriptsamples.asp and search (find) for block. Should get you started.
    – Sam Axe
    Feb 1, 2013 at 21:22
  • or the Content Blocking Extension, yes.. :)
    – Sam Axe
    Feb 1, 2013 at 21:22
1

I haven't tested this out, but it should work.

Try accessing your local server using your public LAN IP address rather than localhost. You should be able to access your server the same way, but with this you should be able to unplug your cable or disable the network adapter to disrupt the connection.

1
  • Aw, man. This is SO CLOSE to being my solution. Unfortunately, this winds up being my IP on the VPN, and when I bounce it, I wind up with a new IP address. And Windows Firewall is still letting requests on 8080 through; blocking the IP address isn't doing any good, either. Do you have any advice on how I can make this work?
    – BlairHippo
    Feb 1, 2013 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .