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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this