Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Forms Authentication Cookie Domain after moving host is incorrectForms Authentication Cookie Domain after moving host is incorrect
Previous
 
Next
New Post
3/9/2016 2:19 PM
 

I hit a problem today moving a site (DNN V7.2.1) to a new host - azure as it happens.  

I bring up the site on the new host using a temporary domain name. Let's say it is "testing.azurewebsites.net".  My home page appears as I hope and I can navigate the site until I try to login.  When I try to login I end up in a loop being redirected back to the login page. Pretty sure this is because the landing page after login is restricted to logged in users and it thinks I haven't logged in.  However, I have used a valid ID and password and I do not get a login error message.

On searching this forum I find 

http://www.dnnsoftware.com/forums/thr...

Which gives me a hint as to the problem and indeed when I look at the network traffic the cookie is on the wrong domain:

Set-Cookie:
.DOTNETNUKE=89EBFDB8C81A1C0E5422009A55C4BD3BEA823465C9034CC49F0CBF55803EBB60A7866A21AAF59DB77374BB9846F46C975EB6687AC9A72AEF37DA3FAF321E5E1D9DDB2A866783B1515D559875BD9D15D90FA6A68505C2F7B1968AB0DF341B4C54EFF6C469EB168B301EA9FE40; domain=.olddomain.co.uk; path=/; HttpOnly


"olddomain.co.uk" (name changed by the way)  being the domain the original site was on. What I don't know is where "olddomain.co.uk" is coming from? The domain is not set in the  web.config file - I am not using single sign-on.  If Ido deliberately set domain to:

<forms name=".DOTNETNUKE" protection="All" timeout="600000" cookieless="UseCookies" slidingExpiration="true" domain=".testing.azurewebsites.net" />

Then login works and I am away, but of course as soon as I point the DNS to the live domain name everything is going to stop working again.

So where is ".olddomain.co.uk" coming from when no specific domain is set in domain setting of the <forms> tag?

 


 

 

 
New Post
3/10/2016 6:57 AM
 
check site Aliases in Admin > Site Settings (2nd tab), the primary alias must meet a valid domain address for your site.
You may also check web.config for a misleading entry (which is usually not necessary)

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/18/2016 3:58 AM
 

Hi Sebastian,

Thanks for your response, but the aliases are correctly configured, including the default.

I eventually tracked the problem down and post in case others hit the same issue.

I do in fact have two .net applications running, one in the root ("olddomain.co.uk"!!) and DNN in a sub-dir.  The web.config for the root site DID have the domain set in the <Forms> tag (even though it didn't need it).  Why the web.config from the root application impacts/overrides(?) the web.config in the sub-dir I don't know and assume this is an Azure thing, because the sites were previously running on a Windows 2012 server in the same configuration without this issue - although it may be that it was because both sites were accessed off the same domain in the the live environment ("olddomain.co.uk" and "olddomain.co.uk/dnn".

Anyway, removing the "domain" entry on the root site resolved the issue. 

So, in summary if you hit this type of issue, it is probably a "domain" entry in a web.config and could be in a web.config other the the DNN version.    

 
New Post
3/18/2016 4:54 AM
 
Installing DNN in a subdirectory is always a bit tricky...
I am glad you were able to sort it out.

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Forms Authentication Cookie Domain after moving host is incorrectForms Authentication Cookie Domain after moving host is incorrect


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out