Register Link On Account Login Module Is Broken

If you receive the following error when clicking the "Register" link on your account login module then please proceed to follow the instructions below to find out how to correct this issue.

Error 
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Home/tabid/36/ctl/Register/returnurl/ /Default.aspx


Solution 

1. Browse to the "Domain Menu" within the Helm control panel for the domain that this issue is occurring on.

2. Locate and click on the "File Manager" icon on your domain menu.

3. Browse to the folder "wwwroot\admin\Authentication"

4. Locate and open the file "Login.ascx.vb" by clicking on it in the file manager window.

5. Find the section of code that looks like the examble just below. (Please note the actual code file will not contain the arrows added in this example)

   Private Sub cmdRegister_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRegister.Click
   <----->
   If PortalSettings.UserRegistration <> PortalRegistrationType.NoRegistration Then
   If PortalSettings.UserTabId <> -1 Then
   ' user defined tab
   Response.Redirect(NavigateURL(PortalSettings.UserTabId, "", "returnurl=" & HttpUtility.UrlEncode(HttpContext.Current.Request.QueryString("returnurl"))),    True)
   Else
   ' portal tab
   If PortalSettings.HomeTabId <> -1 Then
   Response.Redirect(NavigateURL(PortalSettings.HomeTabId, "Register", "returnurl=" &HttpUtility.UrlEncode (HttpContext.Current.Request.QueryString   ("returnurl"))), True)
   Else
   Response.Redirect(NavigateURL("Register", "returnurl=" & HttpUtility.UrlEncode(HttpContext.Current.Request.QueryString("returnurl"))), True)
   End If
   End If
   End If
   <------>
   End Sub

6. Replace all of the code between the arrow markers in the code shown above, with this code below.

   If PortalSettings.UserRegistration <> PortalRegistrationType.NoRegistration Then
   Dim ReturnUrl As String = HttpContext.Current.Request.RawUrl
   If ReturnUrl.IndexOf("?returnurl=") <> -1 Then
   ReturnUrl = ReturnUrl.Substring(0, ReturnUrl.IndexOf("?returnurl="))
   End If
   ReturnUrl = HttpUtility.UrlEncode(ReturnUrl)

   If PortalSettings.UserTabId <> -1 Then
   ' user defined tab
   Response.Redirect(NavigateURL(PortalSettings.UserTabId, "", "returnurl=" & ReturnUrl), True)
   Else
   ' portal tab
   If PortalSettings.HomeTabId <> -1 Then
   Response.Redirect(NavigateURL(PortalSettings.HomeTabId, "Register", "returnurl=" & ReturnUrl), True)
   Else
   Response.Redirect(NavigateURL("Register", "returnurl=" & ReturnUrl), True)
   End If
   End If
   End If

7. Click the "Save" button within the file manager and reload your site. The register link should point to your register page now.

Thanks again to one of our customers, Carl for submitting this solution to this problem.

  • 48 Usuários acharam útil
Esta resposta lhe foi útil?

Artigos Relacionados

Rectify error "Cannot insert the value null into column 'default language'" in DNN 5.1.2 installations.

There is a known issue with DNN 5.1.2 installations which will cause the error "Cannot insert the...

DNN Upgrade Failed - "Value Cannot Be Null" Error

If you have performed an upgrade to your DNN installation and received the following error after...

DNN login link redirects to home page

The tab id for your portal in your site's database got set to the home page tab id.  There...

URL redirection on dnn site

If you want to enable url redirection for your entire dnn site or pages within your dnn site you...

Lost DNN host account password

If you have forgotten your host account password you can promote another DNN user to have the...

Powered by WHMCompleteSolution