Rescue:Single Sign On/C Sharp Example

From LogMeInWiki

Jump to: navigation, search
string sSSOID = [your User ID];
string sSSOPassword = [Should be set manually];

System.Net.HttpWebRequest oReq = 
    (System.Net.HttpWebRequest)System.Net.WebRequest.Create("https://secure.logmeinrescue.com/SSO/GetLoginTicket.aspx?SSOID=" + sSSOID + "&Password=" + sSSOPassword + "&CompanyID=112938");
System.Net.HttpWebResponse oResp = (System.Net.HttpWebResponse)oReq.GetResponse();
string sResp = new System.IO.StreamReader(oResp.GetResponseStream()).ReadToEnd();

if (sResp.StartsWith("OK:"))
    Response.Redirect( sResp.Substring("OK:".Length) );
else
    Response.Write( sResp );
Personal tools