First get the SiteMinder authentication token as follows:
private string ObtainSiteMinderSession()
{
var cookie = Request.Cookies["SMSESSION"];
return cookie != null ? cookie.Value : string.Empty;
}
Then pass this token just like the web service calls (using Microsoft.Http.dll):
using Microsoft.Http;
using Microsoft.Http.Headers;
...
var Client = new HttpClient(baseUri);
var smCookie = new Cookie();
smCookie.Add("SMSESSION", ObtainSiteMinderSession());
Client.DefaultHeaders.Cookie.Add(smCookie);
using (var httpRequest = new HttpRequestMessage(Verbs.GET, "/LoadData/"))
{ ... }
source
share