Showing posts with label sending. Show all posts
Showing posts with label sending. Show all posts

Tuesday, March 20, 2012

A transport-level error has occurred when sending the request to the server. (provider: TC

when i enter the user name, Password and click enter in my site

it showing below error..

A transport-level error has occurred when sending the request to the server.

(provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

What may be the problem..

This does not sound like a SQL Server problem, it's more likely something is acting up in the network.

Have a look at 2 links below if it still fail after few retries:
http://www.mcse.ms/message2316445.html
http://channel9.msdn.com/ShowPost.aspx?PostID=243278

|||

i am accessing the site through internet..

if i reload the error page it loading successfully..

sql

A transport-level error has occurred when sending the request to the server.

Hi,

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

I am using a direct connection from my Gridview to perform a huge database search. the stored procedure will take 10- 60 seconds to execute the query.

What the problem i am facing is when the sp takes long time (more than 1 minutes), then when i try any other operation like calling another sp frm another page, i am getting the above specified error.

Anybody can tell why is it happening?

here my code snippet goes

<asp:GridView ID="searchGV" runat="server" AllowPaging="True" AllowSorting="True"

BorderColor="#999999" BorderStyle="None" CellPadding="3" Width="100%" AutoGenerateColumns="False" DataSourceID="searchObj" DataKeyNames="Recordnumber" OnDataBound="searchGV_DataBound" OnPageIndexChanged="searchGV_PageIndexChanged">

<RowStyle CssClass="gridRow" />

<PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="Black" />

<HeaderStyle CssClass="gridHeader" />

<AlternatingRowStyle CssClass="gridAlternateRow" />

<Columns>

<asp:TemplateField HeaderText="All">

<HeaderTemplate>

<asp:CheckBox ID="chkid" AutoPostBack="true" OnCheckedChanged ="OnCheckChangedEvent" runat="server" />

</HeaderTemplate>

<EditItemTemplate>

<asp:CheckBox ID="chkSelect" runat="server" />

</EditItemTemplate>

<ItemTemplate>

<asp:CheckBox ID="chkSelect" runat="server"/>

</ItemTemplate>

<ControlStyle Height="18px" Width="15px" />

<ItemStyle Width="5px" />

</asp:TemplateField>

<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title">

<ItemStyle Width="150px" />

</asp:BoundField>

<asp:BoundField DataField="Artist" HeaderText="Artist(s)" SortExpression="Artist"/>

<asp:BoundField DataField="Album" HeaderText="Album" SortExpression="Album"/>

<asp:BoundField DataField="Writer" HeaderText="Writer(s)" SortExpression="Writer" ><ItemStyle Width="150px" /></asp:BoundField>

<asp:BoundField DataField="ISRC" HeaderText="ISRC" SortExpression="ISRC" />

<asp:BoundField DataField="UPC" HeaderText="UPC" SortExpression="UPC"/>

<asp:BoundField DataField="PLineLabel" HeaderText="P-Line Label" SortExpression="PLineLabel" ><ItemStyle Width="100px" /></asp:BoundField>

<asp:BoundField DataField="DistLabel" HeaderText="Distribution Label" SortExpression="DistLabel" >

<ItemStyle Width="100px" />

</asp:BoundField>

<asp:BoundField DataField="PublishInfo" HeaderText="Publisher(s)" SortExpression="PublishInfo" />

<asp:BoundField DataField="Recordnumber" HeaderText="Record Number" SortExpression="Recordnumber" />

<%-- <asp:BoundField DataField="UID" HeaderText="UID" Visible="false" />--%>

</Columns>

</asp:GridView>

with adapter

<asp:SqlDataSource ID="searchObj" runat="server" SelectCommand="gsp_titleSearchResult" SelectCommandType="StoredProcedure" ConnectionString="<%$ ConnectionStrings:ConnStr %>">

<SelectParameters>

<asp:ControlParameter ControlID="HuserID" PropertyName="Value" Name="Userid" Type="String" Size="50" DefaultValue="" />

<asp:ControlParameter ControlID="Htitle" PropertyName="Value" Name="title" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hartist" PropertyName="Value" Name="artist" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Halbum" PropertyName="Value" Name="album" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hwriter" PropertyName="Value" Name="writer" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hisrc" PropertyName="Value" Name="isrc" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hupc" PropertyName="Value" Name="upc" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hpline" PropertyName="Value" Name="pline" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hdist" PropertyName="Value" Name="distlabel" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="Hpublish" PropertyName="Value" Name="publisher" Type="String" Size="50" DefaultValue=" " />

<asp:ControlParameter ControlID="ReleaseID" PropertyName="Value" Name="Releaseid" Type="Int32" Size="50" DefaultValue="0" />

<asp:ControlParameter ControlID="RecordLabelID" PropertyName="Value" Name="recordlabelid" Type="Int32" Size="50" DefaultValue="0" />

<asp:ControlParameter ControlID="PublisherID" PropertyName="Value" Name="Publisherid" Type="Int32" Size="50" DefaultValue="0" />

<asp:ControlParameter ControlID="ArtistID" PropertyName="Value" Name="Artistid" Type="Int32" Size="50" DefaultValue="0" />

</SelectParameters>

</asp:SqlDataSource>

Advance thanks

Anvar Sadath


Make sure that if you are using connection pooling the pool size does not hit the configured limit. If you are making use of extensive locking within the procedure (or even SQL Server does) you will get a timeout for the other procedure / statement, waiting for ressources. Try to find out if the procedure does locking using sp_lock or Acitivity monitor or if deadlock are occuring during execution time.


Jens K. Suessmeyer


http://www.sqlserver2005.de

A transport-level error has occurred when sending the request to the server

Hi all,

I am new to SQL 2005. I have one issue and it is as follows:

I write a simple query and run it; it works fine.

Now I break the network connection and run the query; in this case it runs fine.

But when I reconnect the network and run the query, then I get an error as follows:

"A transport-level error has occurred when sending the request to the server. (provider: Named Pipes Provider, error: 0 - An unexpected network error occurred.) "

Every thing is local here. So how the network issue comes here?

For some reason the connection was made through Named Pipes instead of Shared Memory (the default for local connections), which suggests that SqlClient did not recognize the connection was local, and most likely tunneled Named Pipes over TCP, hence, disocnnecting the network has impact.

How do you specify the server name - perhaps by its fully qualified domain name (FQDN), or IP address?

If you specify it by the hostname or "." or "(local)" SqlClient should recognize the local connection, and you should not see the error.

|||

Hi ,

sorry to reply late.

I tried the above mentioned case. In case of "." or "(local)" it did not connect to the SQL server. When I try it by the host name then same original problem persist.

Thanks

|||

Well sorry once again!!!

I made some mistake in the above reply.

I tried as mentioned in the solution and here are the results:

In case of "." it works fine

In case of host name the problem still persists.

for "(local)" I have not yet tested.

Thanks

|||

Regarding the host name problem - do you specify the server name exactly the same way as returned by the Windows hostname command-line command?

|||

Yes, I specify the server name exactly as returned by the the windows hostname command-line command. But the problem still persists.

|||

Great post ~ I had the same problem.

When trying to connect to a local SQL Server I was using 'localhost', which resulted in "A transport-level error has occurred...".

To resolve, I replaced 'localhost' with '(local)', as suggested.

Regards.

|||I same the same problem but I am connecting to remote server using IP, any idea?

A transport-level error has occurred when sending the request to the server

I've tried to search on the web for a solution for this error but i didn't find any working solutions for this problem. We have 2 servers. The first one is the server we use to develop our ASP.NET 2 application. On this server we don't have this error. On the other server (use by our client) we have this error sometime and i don't know why. Both servers have the same configuration and both application have the same web.config file.

I've tried to add a try-catch and retry the query when the error occured. This seems to be working but we don't want to have to change all our connections and since we don't have this problem on the other server we want to find the source of the problem.

Any idea ?

Thanks !

The most frequent cause of this error is restarting SQL Server. Another known cause is altering a database, e.g. from READ_ONLY to READ_WRITE, or taking a database offline/online.

Do any of these apply to your case?

A transport-level error has occurred when sending the request to the server

Hi all,

I am new to SQL 2005. I have one issue and it is as follows:

I write a simple query and run it; it works fine.

Now I break the network connection and run the query; in this case it runs fine.

But when I reconnect the network and run the query, then I get an error as follows:

"A transport-level error has occurred when sending the request to the server. (provider: Named Pipes Provider, error: 0 - An unexpected network error occurred.) "

Every thing is local here. So how the network issue comes here?

For some reason the connection was made through Named Pipes instead of Shared Memory (the default for local connections), which suggests that SqlClient did not recognize the connection was local, and most likely tunneled Named Pipes over TCP, hence, disocnnecting the network has impact.

How do you specify the server name - perhaps by its fully qualified domain name (FQDN), or IP address?

If you specify it by the hostname or "." or "(local)" SqlClient should recognize the local connection, and you should not see the error.

|||

Hi ,

sorry to reply late.

I tried the above mentioned case. In case of "." or "(local)" it did not connect to the SQL server. When I try it by the host name then same original problem persist.

Thanks

|||

Well sorry once again!!!

I made some mistake in the above reply.

I tried as mentioned in the solution and here are the results:

In case of "." it works fine

In case of host name the problem still persists.

for "(local)" I have not yet tested.

Thanks

|||

Regarding the host name problem - do you specify the server name exactly the same way as returned by the Windows hostname command-line command?

|||

Yes, I specify the server name exactly as returned by the the windows hostname command-line command. But the problem still persists.

|||

Great post ~ I had the same problem.

When trying to connect to a local SQL Server I was using 'localhost', which resulted in "A transport-level error has occurred...".

To resolve, I replaced 'localhost' with '(local)', as suggested.

Regards.

|||I same the same problem but I am connecting to remote server using IP, any idea?