ASP.NET web.config中的defaultUrl,loginUrl [英] defaultUrl, loginUrl in ASP.NET web.config

查看:78
本文介绍了ASP.NET web.config中的defaultUrl,loginUrl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我遵循了web.config中定义的设置,那么进入网站的行为是什么,例如www.abc.com?

If I get following setting defined in web.config, and what's the behavior of entering the web site, says, www.abc.com?

我首先要转到default.aspx,然后是login.aspx吗?我遇到此设置可能引起的问题.

Will I first go to default.aspx and then login.aspx? I get a problem which may be caused by this setting.

<forms cookieless="UseCookies" defaultUrl="Default.aspx" enableCrossAppRedirects="false" loginUrl="Login.aspx" path="/" protection="All" requireSSL="false" slidingExpiration="false" timeout="120" />

推荐答案

LoginUrl定义登录名的URL.

LoginUrl defines what is the url of the login.

DefaultUrl定义登录后身份验证过程将带您到何处.

DefaultUrl defines where the authentication process will take you after login.

基本上,用户尝试访问Default.aspx.如果不存在,则IIS接受该请求并搜索autentiation cookie,并使用和处理LoginUrl.

Basically user tries to access Default.aspx. IIS takes the request and search for the autentication cookie if this does not exist the LoginUrl is used and processed.

但是,要做到这一点(至少达到default.asp),您必须包括启用匿名访问.

But, for this to happen (at least reach default.asp) you have to include enable anonymous access.

希望对您有帮助.

这篇关于ASP.NET web.config中的defaultUrl,loginUrl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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