473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

An existing connection was forcibly closed by the remote host

I am useing wcf with c# below is the error i found when i try to save the record twice ,at first time it works fine. It is also reproduce randomly once for the second time i hit save next time for nth time

below is the description of error with stack trace , and piece of code which are having excetion.

================================================== =======
An existing connection was forcibly closed by the remote host
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.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Source Error:


Line 710: IWCFAdmin_AgentUserChannel _objChannel = null;
Line 711: _objChannel = WCFChannelFactory.GetChannel<IWCFAdmin_AgentUserCh annel>(EndpointInfo.WCFAdmin_AgentUser.URL, EndpointInfo.WCFAdmin_AgentUser.Endpoint);
Line 712: objAgentUser = _objChannel.SaveWithSchema(_objAgent, iSegmentAuthoId, iSchemaId);
Line 713: if (_objChannel != null && _objChannel.State != CommunicationState.Closed)
Line 714: _objChannel.Close();


Source File: c:\dev\Catalonia_UI\App_Code\WCF_Wrapper_Admin_Age ntUser.cs Line: 712

Stack Trace:


[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +131

[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +294
System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) +26
System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) +297

[WebException: The underlying connection was closed: An unexpected error occurred on a receive.]
System.Net.HttpWebRequest.GetResponse() +5314029
System.ServiceModel.Channels.HttpChannelRequest.Wa itForReply(TimeSpan timeout) +54

[CommunicationException: An error occurred while receiving the HTTP response to http://localhost:8080/WCFAdmin_AgentUser.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.]
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage reqMsg, IMessage retMsg) +7596735
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData& msgData, Int32 type) +275
Catalonia.ServiceContract.IWCFAdmin_AgentUser.Save WithSchema(AgentUser _objAgent, Nullable`1 iSegmentAuthoId, Nullable`1 iSchemaId) +0
Catalonia.Wrapper.WCF_Wrapper_Admin_AgentUser.Save WithSchema(AgentUser _objAgent, Nullable`1 iSegmentAuthoId, Nullable`1 iSchemaId) in c:\dev\Catalonia_UI\App_Code\WCF_Wrapper_Admin_Age ntUser.cs:712
Admin_UI_UserSecEdit.SaveData() in c:\dev\Catalonia_UI\UI_Admin\UserSecEdit.aspx.cs:9 18
Admin_UI_UserSecEdit.btnSave_Click(Object sender, EventArgs e) in c:\dev\Catalonia_UI\UI_Admin\UserSecEdit.aspx.cs:7 86
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +111
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String eventArgument) +79
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
================================================== ======

thanks
in advance
Apr 1 '10 #1
0 2541

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike | last post by:
VB .NET 2003, Pocket PC 2003, CF 1.0 SP 2 Only when I use a proxy server, I'm getting this error when attempting to write data to a Stream object from an HTTPWebRequest object....
26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
0
by: SisAndz | last post by:
Hello, I'm trying to do a secure connect to the site https://212.77.100.18/p/ with ..net 2.0 HttpWebRequest class, unfortunately for some reason I'm not able to do that - WebException is thrown...
0
by: Sanjay T | last post by:
Hi, We are using ASP.Net 2005 and SQL Server 2005. We are storing sessions in the database. From time to time we get the following exception in the application while the ASP.Net session tries...
1
by: balaya | last post by:
was an error downloading 'https://pushmxtest.equitynational.com/EquityNational/PushMXService.svc/secure'. The underlying connection was closed: An unexpected error occurred on a receive. Unable...
4
by: Anbu | last post by:
Hi All, I'm using the Cassini component in my desktop application to create a web site to host the web services. The application works fine in normal scenario. If the system is kept idle for...
1
by: Jim Hubbard | last post by:
We are using a .Net 2.0 app that connects to a SQL 2005 Express DB and we keep getting this message on the clients. Has anyone seen this error or a solution to it?
1
by: rhepsi | last post by:
hii all, When im trying to upload all the resized photos from the local server onto the live ftp server, im getting an error stating tht: "An existing connection was forcibly closed by the...
2
by: OrcaDK | last post by:
Hi I've started receiving sporadic SqlExceptions throughout my .NET applications (crossing ASP.NET, Windows Services, Winforms - doesn't seem application code specific):...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.