dnn 自定义登录页面后 跳转到登录页面会报错

使用自定义的登录模块出现的问题

 页面的错误是:

You have been redirected to  this   default  Login Page because the Login Page  set   for   this  website does not contain a valid DotNetNuke Account Login module, or the permissions have not been  set  correctly.


具体问题描述可参考:  http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=10367&PROJID=2 

 

Correct, here  is  the cuplrit called by Globals.LoginUrl (also located  in  Globals.vb)  for  your custom login tabid.
        Public Function ValidateLoginTabID(ByVal tabId As Integer) As Boolean
            Dim hasAccountModule As Boolean 
=  Null.NullBoolean
            For Each objModule As ModuleInfo In New ModuleController().GetTabModules(tabId).Values
                If objModule.ModuleDefinition.FriendlyName 
= "Account Login"  Then
                    hasAccountModule 
=  True
                    Exit For
                End If
            Next

            Return hasAccountModule
        End Function
As you can see 
if  your modules FriendlyName  is  not  " Account Login "  then it will  default  redirection to the current tab,  using  the  default  DNN login control. A simple fix  is  to just place the  default   " Account Login "  module on the page and  set  the security to admin only. This will pass  this  check and redirect to the page 


 实际使用中我们只需要修改模块定义的别名。

1.首先修改默认登录模块“Authentication”的模块定义“Account Login”为“Account Login2”。

2.修改自定义登录模块的模块定义名称为“Account Login”。

 

这样修改后就正常了。

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/ajaxleoxu/archive/2010/08/17/1801333.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值