简体   繁体   English

在ASP.NET MVC中使用自定义登录页面进行Intranet Windows身份验证

[英]intranet windows authentication with with custom login page in ASP.NET MVC

We have ASP.NET MVC application with intra and internet user(Windows authentication). 我们拥有带有内部和Internet用户(Windows身份验证)的ASP.NET MVC应用程序。 if user open application within intranet, need to auto login. 如果用户在Intranet内打开应用程序,则需要自动登录。 Else need to show custom login page where we will manually authenticate. 否则,需要显示自定义登录页面,我们将在其中手动进行身份验证。 (Currently it show 401 prompt due to ntlm negotiate). (由于ntlm协商,当前显示401提示)。

Is there a way to show custom login page on ntlm 401. we tried iis error page, application_endrequest and webconfig(error page). 有没有一种方法可以在ntlm 401上显示自定义登录页面。我们尝试了iis错误页面,application_endrequest和webconfig(错误页面)。 Nothing works out. 什么都没有解决。

In Asp.Net MVC you can create custom Error Pages with your own defined html layout in web.config like this: 在Asp.Net MVC中,您可以使用web.config定义的html布局创建自定义错误页面,如下所示:

 <!--IIS Custom Errors-->
   <httpErrors errorMode="Custom" existingResponse="Replace">
      <remove statusCode="404" />
      <error statusCode="404" path="/CustomErrors/404.html" responseMode="ExecuteURL" />
      <remove statusCode="500" />
      <error statusCode="500" path="/CustomErrors/500.html" responseMode="ExecuteURL" />
    </httpErrors>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.Net MVC 3登录和Windows身份验证 - ASP.Net MVC 3 Login and Windows Authentication 为ASP.NET MVC Intranet应用程序实施Windows身份验证的最佳方法是什么? - What's the best way to implement Windows Authentication for an ASP.NET MVC intranet application? Windows身份验证Intranet和ASP.NET身份MVC网站之间的安全集成 - Security Integration between Windows Authentication Intranet and ASP.NET Identity MVC Website 在ASP.Net MVC应用程序中将身份验证从个人帐户更改为Windows(Intranet) - Changing Authentication from individual accounts to Windows (Intranet) in ASP.Net MVC app ASP.NET MVC 4:身份验证和授权:Intranet应用程序 - ASP.NET MVC 4 : Authentication and Authorization:Intranet Application Asp.net MVC 3 Windows身份验证与登录表单 - Asp.net mvc 3 Windows Authentication with Login form 如何使用基本身份验证来访问从Windows服务使用Windows身份验证的Asp.Net MVC 4 Intranet Web API方法? - How to use Basic Authentication to access Asp.Net MVC 4 Intranet Web API method which uses Windows Authentication from a Windows Service? 在ASP.NET MVC5中使用自定义登录进行表单身份验证 - Using Custom Login for forms authentication in asp.net mvc5 Intranet站点的ASP.NET身份+ Windows身份验证 - ASP.NET Identity + Windows Authentication for Intranet Site 如何创建Asp.net mvc安全登录页面认证? - How to create Asp.net mvc secure login page authentication?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM