嗨,我需要检查站点管理员的状态,看看它是否关闭。我目前的解决方案是在指定环境中 ping 站点管理器的策略服务器。有什么方法可以使用 c# 检查 Siteminder 是否启动或关闭?提前致谢
问问题
634 次
1 回答
0
当我在一个使用siteminder的项目中时,我已经将这段代码转储到谷歌文档中。希望它有所帮助
String urltest = "https://domain/authentication.fcc?target=https://domain/desired/stats/page.asp";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(urltest);
CredentialCache MyCredentialCache = new CredentialCache();
MyCredentialCache.Add(new Uri(uriTeste), "NTLM", new NetworkCredential("user", "password", "domain"));
req.Credentials = MyCredentialCache;
req.PreAuthenticate = false;
req.AllowAutoRedirect = true;
req.UnsafeAuthenticatedConnectionSharing = true;
req.Method = "POST";
req.Timeout = 100000;
HttpWebResponse rsp = (HttpWebResponse)req.GetResponse();
于 2013-10-28T08:17:04.177 回答