Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

use fiddler http proxy to kill the traffic temporarily

share|improve this answer
    
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 '13 at 21:09
2  
... with the content-blocking extension (fiddler2.com/fiddler2/extensions.asp). That did it; thank you! –  BlairHippo Feb 1 '13 at 21:17
    
head to http://www.fiddlertool.com/fiddler/dev/scriptsamples.asp and search (find) for block. Should get you started. –  Dan-o Feb 1 '13 at 21:22
    
or the Content Blocking Extension, yes.. :) –  Dan-o Feb 1 '13 at 21:22
add comment

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.

share|improve this answer
    
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 '13 at 20:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.