当我的Login.aspx不在应用程序的根目录时,如何使用ASP.NET登录控件? [英] How do I use ASP.NET Login Controls when my Login.aspx is not at the root of my application?

查看:79
本文介绍了当我的Login.aspx不在应用程序的根目录时,如何使用ASP.NET登录控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ASP.NET登录控件表单身份验证,用于ASP.NET Web应用程序的成员身份/凭据.它一直重定向到我的应用程序根目录中不存在的Login.aspx页面.我的登录页面在一个文件夹中.

I'm using the ASP.NET Login Controls and Forms Authentication for membership/credentials for an ASP.NET web application. It keeps redirecting to a Login.aspx page at the root of my application that does not exist. My login page is within a folder.

推荐答案

对表单项使用LoginUrl属性吗?

Use the LoginUrl property for the forms item?

<authentication mode="Forms">
  <forms defaultUrl="~/Default.aspx" loginUrl="~/login.aspx" timeout="1440" ></forms>
</authentication>

这篇关于当我的Login.aspx不在应用程序的根目录时,如何使用ASP.NET登录控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆