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.

Was this answer helpful?

 Print this Article

Also Read

DNN Host Settings to Improve Site Performance

Try setting the following options within your DNN site's Host Settings area to improve site...

404 Errors on New DNN 7.1.x Installation

If you are encountering an issue with new DNN 7.1.x installations that causes most of DNN's URLs...

How to install DNN Module Using FTP

To add a module to those available for installation, FTP its zip file to the...

Lost DNN host account password

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

My DNN pages sometimes take 10 seconds or longer to load. What is causing this?

Any DNN site or any other ASP.NET based web application is no different than your desktop...