Jump to content
Sign in to follow this  
Girish Dubey

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.

 

Share this post


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.

Guest
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.

Loading...
Sign in to follow this  

×
×
  • Create New...