【发布时间】:2019-07-18 16:37:46
【问题描述】:
我正在尝试使用 AspNetSaml nuget 包 (https://github.com/jitbit/AspNetSaml),但在尝试使用 Response.Redirect(url) 方法时出现错误。
这是错误:
错误 CS0117“响应”不包含“重定向”的定义
我已经在使用命名空间 System.Web 并且还添加了 System.Web.dll
static void Redir(Response samlResponse)
{
//specify the SAML provider url here, aka "Endpoint"
var samlEndpoint = "https://saml.xxxx.com/idp/SSO.saml2";
AuthRequest request = new AuthRequest(
"https://www.xxxx.com/", //put your app's "unique ID" here
"https://www.xxxx.com/" //assertion Consumer Url - the redirect URL where the provider will send authenticated users
);
// Generate the provider URL
string url = request.GetRedirectUrl(samlEndpoint);
Response.Redirect(url);
}
【问题讨论】:
标签: c# .net saml system.web