I am implementing salesforce in my ASP.Net application and currently I am able to have login process as Username & password but now I want to change it to OAuth authentication. So i am able to get my Refresh Token & Access Token. Can any one please help me in order to create the session ID using these Token. Like in Password login we are generating the session ID, So is the process same in OAuth authentication also. Kindly check the below code how i did the login with password authentication.
binding = new SforceService();
LoginResult lr;
lr = binding.login(username, password);
if (lr.passwordExpired)
{
done = false;
break;
}
String authEndPoint = binding.Url;
binding.Url = lr.serverUrl;
binding.SessionHeaderValue = new PartnerWSDL.SessionHeader();
binding.SessionHeaderValue.sessionId = lr.sessionId;
header = new PartnerWSDL.SessionHeader();
header.sessionId = lr.sessionId;