简体   繁体   English

验证凭据并重定向到给定页面

[英]Validate Credentials and Redirect to given page

I am sending an email to an external user with the link.我正在通过链接向外部用户发送电子邮件。

This is how my url looks.这就是我的网址的外观。 "www.Details.aspx?Id=1234". “www.Details.aspx?Id=1234”。

When user clicks on Url, I want to him to go Login page first, validate his credentials and then redirect to the given page.当用户点击 Url 时,我想让他先去登录页面,验证他的凭据,然后重定向到给定的页面。

How can I do this using Windows Authentication ?如何使用 Windows 身份验证执行此操作? How to give URl ?如何给 URl ?

Thanks,谢谢,

If you use Windows Authentication, you don't need a login page.如果您使用 Windows 身份验证,则不需要登录页面。

You need to put this in your web.config (inside system.web):你需要把它放在你的 web.config(在 system.web 里面):

<authentication mode="Windows"/>

If your website is in IIS, you need to configure the site so that it uses windows authentication.如果您的网站在 IIS 中,则需要配置该站点以使其使用 Windows 身份验证。

Create an ASP.NET Web page named Login.aspx in your application.在您的应用程序中创建一个名为Login.aspx的 ASP.NET 网页。

Note: By default, ASP.NET forms authentication is configured to use a page named Login.aspx.注意:默认情况下,ASP.NET 表单身份验证配置为使用名为 Login.aspx 的页面。 You can change the default login page name in the Web.config file for your application using the LoginUrl property.您可以使用 LoginUrl 属性更改应用程序的 Web.config 文件中的默认登录页面名称。

From the How to: Create an ASP.NET Login Page MSDN article: http://msdn.microsoft.com/en-us/library/ms178331(v=vs.90).aspx来自如何:创建 ASP.NET 登录页面MSDN 文章: http : //msdn.microsoft.com/en-us/library/ms178331( v= vs.90).aspx

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM