2

I have an application that connects to database on remote server. I need to test how application will works in case when temporary lost connection. I cannot disconnect network cable. Does it possible to interrupt temporarily connection and after restore? OS - windows. Thanks.

4
  • Can you disable your network? You can do that from Network Adapter settings. Commented Jan 30, 2012 at 13:20
  • I cannot disable my network throw control panel. I think that some application can do. Commented Jan 30, 2012 at 13:23
  • By you cannot, do you mean that you do not have the privilege of that? Commented Jan 30, 2012 at 13:25
  • Why you ask about privileges? How it can be related to my question? I create connection in my application. For test I need to check how it works when connection will be interrupted. It must reconnect. Commented Jan 30, 2012 at 13:36

3 Answers 3

1

You can use a software firewall if you have one that blocks certain applications. Even the Windows firewall (Win 7 & Vista) has this option.

Sign up to request clarification or add additional context in comments.

1 Comment

I cannot change firewall settings. Now I think to install some db emulator to check connection...
1

In windows you can use netsh command to disable a network interface. See the usage in this answer. But I believe this command behaves differently according to the OS version...

If it does not work maybe try the devcon utility.

The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon also provides information that is relevant to the driver developer and is not available in Device Manager.

You can use DevCon with Microsoft Windows 2000, Windows XP, and Windows Server 2003. You cannot use DevCon with Windows 95, Windows 98, or Windows Millennium Edition.

1 Comment

Can you further explain your requirements/constraints then?
0

For me clumsy is the best fit solution I found to simulate bad network conditions. https://jagt.github.io/clumsy/

saw it here: https://serverfault.com/q/302299

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.