zoukankan      html  css  js  c++  java
  • 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”。

    这样修改后就正常了。

  • 相关阅读:
    爬虫-基于scrapy-redis两种形式的分布式爬虫
    爬虫-Scrapy框架(CrawlSpider)
    爬虫-User-Agent和代理池
    爬虫-scrapy框架之递归解析和post请求
    爬虫-scrapy数据的持久化存储
    爬虫-scrapy框架简介和基础应用
    爬虫-移动端数据爬取
    爬虫-图片懒加载技术、selenium和PhantomJS
    爬虫-验证码处理
    爬虫-requests模块
  • 原文地址:https://www.cnblogs.com/ajaxleoxu/p/1801333.html
Copyright © 2011-2022 走看看