如何在 IIS 7.5 的 MVC 2 中混合使用表单身份验证和 Windows 身份验证?

发布于 2024-10-04 12:46:04 字数 972 浏览 1 评论 0原文

我已经看到很多这样的帖子,如果您在 IIS 7.5 中运行 ASP.Net 应用程序而不是 MVC 2 应用程序,它可以解决该问题。使用 web.config 中的位置和 2 个单独的登录页面,是否可以像 asp.net 那样使用相同的解决方案?您需要注册一条新路线才能做到这一点吗?

我知道它可以与 IIS 中的 2 个单独的应用程序一起使用,但我希望它们都在同一个应用程序中。有什么想法吗?

asp.net

I've seen this posted alot that solves the problem if you are running ASP.Net application not a MVC 2 one in IIS 7.5. Would the same solution work using location in the web.config and 2 seperate login pages like it does for asp.net? Do you need to register a new route to do that?

I know it would work with 2 seperate applications in IIS, but i want them all in the same application. Any ideas?

Solutions for asp.net

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡绿茶香 2024-10-11 12:46:04

看起来您可以使用以下解决方案。

但我必须在我的 MVC 解决方案中创建一个 ASP.net 页面,直接处理 Windows 身份验证,然后重定向到 mvc 站点。 web.config 内的位置部分应该可以工作,因为它不依赖于路由。

It looks like you can use the following solution.

But i had to create a ASP.net page inside my MVC solution that gets hit directly to handle the Windows Authentication then redirects to the mvc site. The location section inside of the web.config should work then since it's not relying on the routing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文