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

Posted on 2011-03-10
Last Modified: 2012-05-11
i get this error some time in my website .
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
Question by:ajaymaster143
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 35104635
not help for me
look at my code
 string cnshiv = "Data Source=myserver;Initial Catalog=shivdiamond;pooling=false;Persist Security Info=True;User ID=admin;Password=admin";
   string cnstock = "Data Source=newserver;Initial Catalog=shiv;pooling=false;Persist Security Info=True;User ID=saadmin;Password=password";

    protected void Page_Load(object sender, EventArgs e)
        SqlConnection cnsql;
        SqlCommand cmsql;
        SqlDataReader drsql;
        cnsql = new SqlConnection(cnshiv);
        string sql = "select * from shivadmin.exportsotck where id >3170 order by id";
        cmsql = new SqlCommand(sql, cnsql);
        drsql = cmsql.ExecuteReader();
        while (drsql.Read())
            SqlConnection cn;
            SqlCommand cm;
            cn = new SqlConnection(cnstock);
            string id,Code,designno,exportno,grosswt,diamonpc,diamondwt,size,length,width,clarity,status,price,itemstype,exportto,endtime,aprl,soldprice,address,image,category,subcategory;
            id = drsql["id"].ToString();
            Code = drsql["Code"].ToString();
            designno = drsql["designno"].ToString();
            exportno = drsql["exportno"].ToString();
            grosswt = drsql["grosswt"].ToString();
            diamonpc = drsql["diamonpc"].ToString();
            diamondwt = drsql["diamondwt"].ToString();
            size = drsql["size"].ToString();
            length = drsql["length"].ToString();
            width = drsql["width"].ToString();
            clarity = drsql["clarity"].ToString();
            status = drsql["status"].ToString();
            price = drsql["price"].ToString();
            itemstype = drsql["itemstype"].ToString();
            exportto = drsql["exportto"].ToString();
            endtime = drsql["endtime"].ToString();
            aprl = drsql["aprl"].ToString();
            soldprice = drsql["soldprice"].ToString();
            address = drsql["address"].ToString();
            image = drsql["image"].ToString();

            category = drsql["category"].ToString();

            subcategory = drsql["subcategory"].ToString();

            string sq="insert into sainath.exportsotck values('" + id + "','" + Code + "','" + designno +"','" + exportno + "','" + grosswt + "','" + diamonpc + "','" + diamondwt + "','" + size + "','" + length + "','" + width + "','" + clarity + "','" + status + "','"  + price + "','" + itemstype + "','" + exportto + "','" + endtime + "','" + aprl + "','" + soldprice + "','" + address + "','" + image + "','" + category + "','" + subcategory + "')";   
        cm=new SqlCommand(sq,cn);


Open in new window

LVL 11

Expert Comment

by:Kusala Wijayasena
ID: 35107058
Check this out:

LVL 29

Accepted Solution

fibo earned 500 total points
ID: 35353511

Can you test the result of changing line 11 to
        string sql = "select  id,Code,designno,exportno,grosswt,diamonpc,diamondwt,size,length,width,clarity,status,price,itemstype,exportto,endtime,aprl,soldprice,address,image,category,subcategory from shivadmin.exportsotck where id >3170 order by id";

Open in new window

This would decrease the volume of data to be transferred and so the burden on the network
LVL 29

Expert Comment

ID: 35361167

Thx for the grade and points. You did not comment though if my suggestion solves your problem.
If it does not, you should restart the "question delete" process. If needed, moderators will help.

B-) And if this is a solution, I'm glad for both of us!

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question