webrequest中基于声明的身份验证

时间:2013-07-22 05:56:16

标签: asp.net-mvc security sharepoint claims-based-identity federated-identity

webrequest如何在这些twi应用程序之间进行...

Diagram 示例代码:

HttpWebRequest webRqst = (HttpWebRequest)WebRequest.Create(endpoint);
webRqst.UseDefaultCredentials = true;
webRqst.Method = "GET";
webRqst.Accept = "*/*";
webRqst.KeepAlive = true;
 using (WebResponse response = request.GetResponse())
                {
                    using (Stream stream = response.GetResponseStream())
                        {
                            using (StreamReader reader = new StreamReader(stream))
                            {
                                Console.WriteLine(reader.ReadToEnd());
                            }
                         }
                }

在我提出请求时,它总是在寻找登录页面。我的回复始终是STS中的登录表单。谢谢。