Wednesday, February 17, 2010

DNN Redirect Loop

I was setting up a local dev edition of our DNN site and I went through the usual cycle:

1. Copy site to local machine

2. Set the permissions on the folder

3. Create a website in IIS

4. Copy the database to the local SQLServer Express instance

5. Update the Portal Alias table to point to the localhost

6. Update web.config’s connection strings and SiteSQLServer settings as well as the “SecureDomains”, “RedirectUrl’, and “DisplayServer” to point to the localhost.

7. Test

Hmmph!

The homepage was ending up in an infinite redirect loop (IE does not complain and just keeps on going in the loop. Chrome is smarter about this and complains and stops with an error page).

Weird thing was that I could hit a page alright if I had the correct tabid. But I could not just go “http://localhost/”

I checked the usual suspects – the PortalAlias table and also made sure that none of the entries ended with a “/” – all that was fine.

Finally found out the issue was occuring because the RedirectUrl setting in the web.config file had a trailing “/” (http://localhost/"). DNN does not like that!

No comments: