Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DNN redirect Loop

Tags:

dotnetnuke

I am trying to duplicate an existing DNN portal that I have for testing purposes by creating a duplicate of the database and duplicating the .net files into a new folder.

After I copied the site and changed the webconfig to point to the new site and changed the alias in the database I am getting this error.


This webpage has a redirect loop.

The webpage at http://xxx.us/xxx/default.aspx has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

like image 878
JAllen Avatar asked Jun 14 '10 19:06

JAllen


2 Answers

Here's a list of common causes for DNN redirect loops:

1) You are setting the trust level to medium and using the 1.0.61025.0 version of System.Web.Extensions. Update the trust level to full and and update ALL occurrences of System.Web.Extensions to 3.5.0.0 in the web.config (assuming .NET 3.5 framework is installed).

Original:

<trust level="Medium"... ...
 ...System.Web.Extensions,
 Version=1.0.61025.0...

Updated:

 <trust level="Full"... ...
 ...System.Web.Extensions,
 Version=3.5.0.0...

You should also check if there is a System.Web.Extensions.dll (version 1.0.61025.0) in the /bin directory. If no compiled module is dependent on this assembly version, you can remove the file. Otherwise, use assembly redirection in the web.config runtime section:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>

2) You have a trailing slash in the HTTPAlias field in the PortAlias table, remove it.

like image 64
mika Avatar answered Nov 10 '22 11:11

mika


JAllen, in my experience, this is an incorrectly formatted PortalAlias record.

My suggestion is to try a few extra iterations.

Examples:

  • "localhost" works for me, but "localhost/" does not.
  • "www.domain.com" works, but "domain.com" does not. (because domain.com is not bound in IIS, whereas www.domain.com is"

The specific value that goes into your PortalAlias table depends upon your IIS bindings. You may also need to check your hosts file to verify that localhost is available to you

C:\Windows\System32\drivers\etc\hosts

In over 20 DNN deployments, this has caused me some pain a handful of times, at least.

like image 35
Brian Webster Avatar answered Nov 10 '22 11:11

Brian Webster