Transport level error RRS feed

  • Question

  • Hi,

    I have webserver and appliction server,
    When i run the following code on application server it is okey.



    (SqlConnection cnn = new SqlConnection(MyCnn)
       string sPatchTale =
    @"IF NOT EXISTS (SELECT * FROM sys.objects
                                     WHERE object_id = OBJECT_ID(N'[dbo].[Patch]') AND
                                     type in (N'U'))
                                           Create proc xTest AS begin select 'a' end



      using (SqlCommand cmd = new SqlCommand(sPatchTale, cnn))
        cmd.CommandType =

    When i run the previous code on Web serve i accpet an error :
    'Transport level error has occurred when recieving  results from the server.(provider TCP Provider, error 0 - The specified network is no longer avialable.)

    When i replace the following :
    Create proc xTest AS begin select 'a' end
    Select top 1 * from myTbl
    It works.

    When i try to create table it gives the same error i think that there is an issue
    with the security , Why this occurs and how can i fix it ?


    Monday, May 17, 2010 6:07 AM

All replies

  • Sounds like this issue is the same as the one posted at

    Try clearing th pool and trying to acquire the connection again.

    Monday, May 17, 2010 4:44 PM
  • No it is not the same thread.

    Because at my issue the connection was established and as i wrote commands contains select statments and delete and update and they are runing successfully.

    When the command contains create table and commands that they are causing the schema to be changed at the sql i did accept the error.

    As i wrote before please read it again, it sounds like somthing at the firewall doesn't enable these commands but how can i discover what causing this error ?

    Monday, May 17, 2010 8:13 PM
  • Hello khalil,

    Please take a look at this KB article:

    Do you have the same Call Stack when the exception occurs? Usually, this exception occurs because the query is timeouted. You could set the CommandTimeout property to specify the time before teminating the command.

    Best regards

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Thursday, May 20, 2010 9:10 AM
  • Hi,

    I try to set the connection timeout but it doesn't relate to it, please read my post again.


    Thursday, May 20, 2010 10:11 AM