.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Command timeout in QA environment

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :ASP.Net
Hi I am facing a very diff. problem. My stored proc execution runs perfectly on local developement environment, but in QA environment it just returns an error after 5 min.s(My stored proc. takes arround 15 min.s to complete), when i run my Stored proc from query analyzer it runs perfectly in 15 min.s. I tried to debug the code by pointing my local code to QA database, but that didn't give any error and ran perfectly. So i suspect there is something like commandtimeout happening in QA environment. Then i went on to check code at QA environment, it passes commandtimeout = 0 to the command object which means infinite. I am really puzzled by this. Please help me out if anyone can give me any idea to solve this... 

View Complete Post

More Related Resource Links

SSIS - Adjusting command timeout (good or bad practice)

Hi,   I'm building a bank reconciliation process where I'm leveraging SSIS to import, transform and insert data into a database.  I had a command timeout error at the transformation segment (Derived Column methods). At first was it difficult to determine (Ambigious SSIS errors), but in the end was easy to resolve.  I simply increased the timeout duration. Being a developer, I find this to be bad practice as the application should be optimized as much as possible prior to making a timeout adjustment.  An ideal method would have been to cache more data prior to calling the database command, so the data is available for processing and not keeping the command open unnecessarily. I'm relatively new to SSIS, but have been unable to determine a method to remove the transformation bottleneck. I could do it easily enough with customized .NET code, but I'd prefer not to do that.  My question - There must be a method in SSIS that buffers the data originating from the transformation prior to calling my INSERT to database method?   Thank you,   Russ

Connection timeout and command timeout : they working?


Hello everyone
I'm checking these parameters to connect to a server from a wireless client in the presence of little or no coverage to alert the operator of the problem.
I tried to lower both the timeout to 5 seconds. But if there is no connection sometimes takes 90 sec. sometimes only 45sec. first to tell me that is not 'unable to contact the server.
The connection string I use is' this:
Provider = SQLOLEDB.1; Persist Security Info = False; User ID = sa; Initial Catalog = Ideabiella; Data Source = localhost; Connect Timeout = 5;
and when I open the command also sets the CommandTimeout to 5sec.
where am I wrong?

hello and thanks

Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


Print command



Is there a way of setting up a print area for a part of my webpage, I only want to print a certain part of the page, when I select print at the moment it will print the whole page and the layout is rubbish!!

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is no



 I keep getting the following error. I also added time out parameter in the connection stirng and it still did not help. Has any one faced similar issues.

Thanks in adavance.

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]

command object error


Could someone please tell me what is wrong with my syntax here?  I'd be much appreciative.


objCmd = New SQLCommand("SELECT CASE WHEN objDR('Item') = 'Enter Bill of Lading' then enterbol " _  

& "WHEN objDR('Item') = 'Bill of Lading History' THEN bolhistory " _  

& "WHEN objDR('Item') = 'Request Transfer' or objDR('Item') = 'View Transfer in Progress' THEN transfers " _  

& "END  from plantGroups where plantgroupid=@plantgroupid", objConn)

SQL 2008 timeout


I am recently getting a timeout exception when executing this method. This table stores images and it might be due to the size of the table. I have no idea! Help!


 Public Sub StoreFile(ByVal fileId As Integer, ByVal upload As Stream, ByVal connection As SqlConnection)
            Dim bufferLen As Integer = 8040
            Dim br As BinaryReader = New BinaryReader(upload)
            Dim chunk As Byte()
            chunk = br.ReadBytes(bufferLen)

            Dim cmd As SqlCommand = _
            New SqlCommand("UPDATE tblContactDocuments SET ContractDocument=@Buffer WHERE AutoID=@FileId", _
            cmd.CommandTimeout = 30
            cmd.Parameters.AddWithValue("@FileId", fileId)
            cmd.Parameters.Add("@Buffer", SqlDbType.VarBinary, bufferLen).Value = chunk

            Dim cmdAppend = New SqlCommand("UPDATE tblContactDocuments SET CONTRACTDOCUMENT.WRITE(@Buffer, NULL, 0) WHERE AutoID=@FileId", _
            cmdAppend.Parameters.AddWithValue("@FileId", fileId)
            cmdAppend.Parameters.Add("@Buffer", SqlDbType.VarBinary, bufferLen)
            chunk = br.ReadBytes(bufferLen)

            While (c

ReadXML Timeout


I am reading an XML file from an external URL and putting it into a dataset that is the populates a repeater. This works fine when I run it locally, however on the published web site I receive A connection attempt failed because the connected party did not properly respond after a period of time error messages.

However, if i type the URL directly into a browser, I get the XML file almost immeadately which leads me to believe that I am going about this the wrong way or I need to some how to extend the timeout period.

Here is my code:

Protected Sub ButtonValidate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonValidate.Click
        If Page.IsValid = False Then
        End If

        TableCellVATSIMIDResults.Text = "<br />VATSIM ID Validation Results for <i>" & TextBoxVATSIMID.Text & "</i>"
        Dim DataSetVATSIMValidation As New DataSet
        DataSetVATSIMValidation.ReadXml("http://cert.vatsim.net/cert/vatsimnet/idstatus.php?cid=" & TextBoxVATSIMID.Text)


<asp:Repeater runat="server" ID="RepeaterVATSIMValidation">
                    <HeaderTemplate />

Design Patterns: Simplify Distributed System Design Using the Command Pattern, MSMQ, and .NET


Service-oriented architecture is a great framework when you need to perform distributed computing tasks over the Internet. But when you want to perform processing inside your local network, a different solution may provide a better fit. That solution, based on the Command pattern, uses Windows services and Microsoft Message Queuing to implement a queued system that meets your needs better than a service-oriented solution. This article explains how to build it.

Brad King

MSDN Magazine September 2004

Command Management: Use Design Patterns to Simplify the Relationship Between Menus and Form Elements


In Windows Forms applications, similar commands, such as those in a menu and their counterparts on a toolbar, are not automatically related. They don't fire the same event or run the same handler routine. Yet code that allows the same or similar user commands to fire the same code simplifies development.This article describes the principles of command management and why it's important to have functional commands that are not exclusive to any one UI element. In order to provide an MFC-like command management infrastructure, a design pattern is developed and applied as a series of C# classes.

Michael Foster and Gilberto Araya

MSDN Magazine October 2002

.NET Delegates: Making Asynchronous Method Calls in the .NET Environment


One of the many great features of the .NET Framework is that it has asynchronous infrastructure built in. In .NET you can call any method asynchronously by defining a delegate for the method and calling the delegate's asynchronous methods. This is beneficial to your application because when a synchronous call is made, the calling thread is blocked until the method completes whereas an asynchronous call is made on a different thread, and this allows the original thread to continue its work while the asynchronous call is in progress.This article explains delegates in .NET and how to use them to perform asynchronous calls, eliminating age-old threading problems.

Richard Grimes

MSDN Magazine August 2001

Windows CE: eMbedded Visual Tools 3.0 Provide a Flexible and Robust Development Environment


This article provides an overview of writing applications for Windows CE 3.0. Unicode support in Windows CE, the kernel, memory management, the object store, and COM and DCOM are discussed. The article also covers the user interface, graphics, the Internet, and how Windows CE compares to the desktop in each of these areas. eMbedded Visual Tools 3.0 is discussed in depth. To help the reader decide which tools to use, development with Visual Basic, Win32, MFC, and ATL are explained. Text editor samples with this article have been developed with Visual Basic and Win32 so their implementations can be compared.

Paul Yao

MSDN Magazine January 2001

How to set session timeout and clear session in asp.net C# ? And kill session when close the web app


hi ,

How to set session timeout and clear session in web.config and login.aspx  ? And when we close the web application , the session must be cleared ?

I have use session.abandon as per below but is not working . Pls advise .


        protected void btnLogout_Click(object sender, EventArgs e)



Problems moving an InfoPath form from a DEV system to QA environment


We developed an InfoPath form using a local DEV environment.  The site collection under which the form was developed was http://server1/.

We are now attempting to deploy this form to a TEST environment that uses a slightly different structure for the collection, namely http://server2/sites/sitecol1.

In both cases the site that contains the form is /fin (so we were using http://server1/fin in DEV and want to use http://server2/sites/sitecol1/fin in TEST). 

The form contains VBA code and so requires admin-based deployment via Central Administration, so to deploy to TEST we:

1. Publish the form against the TEST server using InfoPath Designer

2. Upload the form using Central Administration > Application Managment > Manage Form Templates

3. After upload, we activate the form for the site collection http://server2/sites/sitecol1/

4. The form is then associated with a Form Library

When we try to create an instance of the form within this library we get the following error when we click on New to create the form instance:

The following location is not accessible, because it is in a differ

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend