473,794 Members | 2,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

An existing connection was forcibly closed by the remote host

1 New Member
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.Sock ets.SocketExcep tion: An existing connection was forcibly closed by the remote host

Source Error:


Line 710: IWCFAdmin_Agent UserChannel _objChannel = null;
Line 711: _objChannel = WCFChannelFacto ry.GetChannel<I WCFAdmin_AgentU serChannel>(End pointInfo.WCFAd min_AgentUser.U RL, EndpointInfo.WC FAdmin_AgentUse r.Endpoint);
Line 712: objAgentUser = _objChannel.Sav eWithSchema(_ob jAgent, iSegmentAuthoId , iSchemaId);
Line 713: if (_objChannel != null && _objChannel.Sta te != CommunicationSt ate.Closed)
Line 714: _objChannel.Clo se();


Source File: c:\dev\Cataloni a_UI\App_Code\W CF_Wrapper_Admi n_AgentUser.cs Line: 712

Stack Trace:


[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sock ets.Socket.Rece ive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73
System.Net.Sock ets.NetworkStre am.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.Sock ets.NetworkStre am.Read(Byte[] buffer, Int32 offset, Int32 size) +294
System.Net.Pool edStream.Read(B yte[] buffer, Int32 offset, Int32 size) +26
System.Net.Conn ection.SyncRead (HttpWebRequest request, Boolean userRetrievedSt ream, Boolean probeRead) +297

[WebException: The underlying connection was closed: An unexpected error occurred on a receive.]
System.Net.Http WebRequest.GetR esponse() +5314029
System.ServiceM odel.Channels.H ttpChannelReque st.WaitForReply (TimeSpan timeout) +54

[CommunicationEx ception: An error occurred while receiving the HTTP response to http://localhost:8080/WCFAdmin_AgentU ser.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.Proxie s.RealProxy.Han dleReturnMessag e(IMessage reqMsg, IMessage retMsg) +7596735
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData& msgData, Int32 type) +275
Catalonia.Servi ceContract.IWCF Admin_AgentUser .SaveWithSchema (AgentUser _objAgent, Nullable`1 iSegmentAuthoId , Nullable`1 iSchemaId) +0
Catalonia.Wrapp er.WCF_Wrapper_ Admin_AgentUser .SaveWithSchema (AgentUser _objAgent, Nullable`1 iSegmentAuthoId , Nullable`1 iSchemaId) in c:\dev\Cataloni a_UI\App_Code\W CF_Wrapper_Admi n_AgentUser.cs: 712
Admin_UI_UserSe cEdit.SaveData( ) in c:\dev\Cataloni a_UI\UI_Admin\U serSecEdit.aspx .cs:918
Admin_UI_UserSe cEdit.btnSave_C lick(Object sender, EventArgs e) in c:\dev\Cataloni a_UI\UI_Admin\U serSecEdit.aspx .cs:786
System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e) +111
System.Web.UI.W ebControls.Link Button.RaisePos tBackEvent(Stri ng eventArgument) +79
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String eventArgument) +10
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument) +13
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +175
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +1565
=============== =============== =============== ===========

thanks
in advance
Apr 1 '10 #1
0 2570

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

Similar topics

0
2404
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. (System.IO.Stream.Write() raises the exception):"An existing connection was forcibly closed by the remote host". The error only happens with fairly large amounts of data (around 24,500 bytes). Here is ToString() of the exception object raised:
26
16536
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 Win2K3/IIS6.0), do we still need this patch? 2) Does it specifically solve only this error: The underlying connection was closed. An unexpected error
0
1973
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 with inner exception message of "An existing connection was forcibly closed by the remote host." I hoped I'll solve my problem with RemoteCertificateValidationCallback delegate which always returns "true", but it isn't called at all for this...
0
1209
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 accessing the database. This also happens from time to time when our application is accessing the database. To make the posting brief, I am just putting part of the exception. Any ideas why this might be happening? Our web application is behind F5...
1
12679
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 to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host
4
2231
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 some time, the application getting terminated with the following error: Unhandled Exception : An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Send(Byte buffer, Int32 offset, Int32
1
4446
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
3059
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 remote host " For n= 0 To lstFileNames.Items.Count - 1 Step 1 Try xImg1 = lstFileNames.Items(n).ToString() ff.UploadFile(xImg1)
2
3904
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): System.Data.SqlClient.SqlException: 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. The SQL Server (Dell PE1950, 8GB ram, Quad Xeon 2.5G+) is...
0
9671
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10161
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.