Jump to content

TLS Security with 4.0 .net framework. The underlying connection was closed: An unexpected error occurred on a receive.

Recommended Posts

I am trying to consume service using proxy class. i am getting below exception.

"The underlying connection was closed: An unexpected error occurred on a receive."


ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

//proxy class initialization
ISessionManager objISessionManager = new SessionManagerClient("https://abcxyz.com/sessionmanager.svc");
LogonRequest objLogonRequest = new LogonRequest();
objLogonRequest.logonRequestData = new LogonRequestData();
objLogonRequest.ContractVersion = APICredential.ContractVersion;
objLogonRequest.logonRequestData.DomainCode = APICredential.AgentDomain;
objLogonRequest.logonRequestData.AgentName = APICredential.AgentID;
objLogonRequest.logonRequestData.Password = APICredential.Password;

LogonResponse objLogonResponse = objISessionManager.Logon(objLogonRequest);


can you suggest how we can fix it.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...