注销并重定向到asp.net MVC上的单独注销页面

时间:2017-10-18 23:34:50

标签: c# .net asp.net-mvc

天啊,我正在研究注销功能,并尝试更新重定向。现在点击退出时。在我的家庭控制器RedirectResult SignOut() { FormsAuthentication.SignOut(); Session.Abadon(); Redirect(SignOutEndPoint); } 的注销操作中,您将成功注销并向用户显示标准的注销页面。

ActionResult temp = RedirectToAction("SignOut", "Authenticate");
return View("~")

我尝试让用户进入登录页面,而不是标准的退出页面。我在以下代码之后静静地签了名。通过调用此代码,它返回500.有些人可能指出我正确的方法吗?谢谢。

return RedirectToAction("SignOut", "Authenticate")

一种不同的方式,是否有办法拦截@VisibleForTesting Set<Metric> removeDuplicates(List<Metric> metrics) { Map<RawMetric, Metric> metricsMap = new HashMap<>(); for (Metric metric : metrics) { RawMetric rawMetric = RawMetric.builder() .metricName(metric.getName()) .metricType(metricName.getMetricType()) ... // and more .build(); // pick the latest updated metric (based on lastSeen date) BiFunction<RawMetric, Metric, Metric> biFunction = (k, v) -> Metric.builder() .name(k.getMetricName()) .metricType(k.getMetricType()) ... // and more .lastSeen(v.getLastSeen().after( metricName.getLastSeen()) ? v.getLastSeen() : metricName.getLastSeen()) .firstSeen(v.getFirstSeen()) .build(); metricsMap.putIfAbsent(rawMetric, metric); metricsMap.computeIfPresent(rawMetric, biFunction); } return ImmutableSet.copyOf(metricsMap.values()); } @Value @Builder static class RawMetricName { private String metricName; private String metricType; private String ad; private String project; private String fleet; private String host; private int granularity; } 并处理其他重定向?

0 个答案:

没有答案
相关问题