I need to test some ASP.NET code that handles timeout exceptions from an MS-SQL database call.
I can reduce my CommandTimeout parameter in the connection, however this can lead to errors before my code.
Is there an easy way to force the database to timeout 'on cue'?
What you are looking for is the WAITFOR command , the database timeout in the queue whenever you want.
Start the transaction in the SQL window of the management studio, update the table and do not commit it:
BEGIN TRAN UPDATE table SET ...
This will block the attempt of any website to read this table.
, , try, ?
, ... , , !
Ive , Ethernet- lol...
, (sc stop "MSSQL $SQLEXPRESS" - ).
, mock, .
-.
write down a procedure or request that takes more than 30 seconds to execute and call it from asp.net code.
Source: https://habr.com/ru/post/1711639/More articles:How to create a new user in SharePoint when the user does not exist in AD? - migrationHandheld Development, Lazarus or Turbo Delphi.Net - sql-serverСкомпилировать ошибку при действии для приложения iPhone: "error: expected" ) "before"; лексема" - objective-cНажмите ссылку, добавьте текст в textarea? - javascriptInstall IonCube on IIS7 / Windows Server 2008 - phpHow to add a dynamic Google map to my site? - google-mapsusing rmic in netbeans - javaUsing the in HTML - htmlDynamically loading part of a window in Cocoa - objective-cWCF service client with svcutil (no "extra" clientide-datatype def.) - web-servicesAll Articles