This project has moved. For the latest updates, please go here.

Error 403 and 404 on Custom Domain Name (new discussion)

Coordinator
Sep 13, 2011 at 12:25 PM
Edited Sep 13, 2011 at 12:26 PM

I'm creating this thread quoting the post of @ssaturn (John). Sorry for creating this new thread but seems that the previously pasted HTML was breaking the page and answering/editing the thread was impossible.

ssaturn wrote:

 

Hi, I am facing some issue on Custom Domain Name. Event I following the troubleshooting document

Check that the service name has been included in the setting "hostHeaders" on the service configuration file (i.e. mycloudservice.cloudapp.net ==> hostHeader="mycloudservice.cloudapp.net;www.mycloudapplication.com")

For example I can access my site thru sample.cloudpp.net, but I can't access my site thru custom domain name www.sample.com. My custom domain name www.sample.com is pointing to sample.cloudpp.net.

I will get the error message such as 404 or 403 whenever I try to access thru Custom Domain name.

Anyone encounter this issue? Or I miss out some setting?

Thanks,

Regards,

John

 

Hi John,

Just a simple question. Have you added the portal alias for the portal at "DNN level"? This is: 

  1. Go to Admin>Site Settings>Advanced Settings>Portal Aliases
  2. Add an alias for www.mycloudapplication.com
  3. Restart the web application through Tools>Recycle Application Pool

Tell me if this fix your problem.

Regards,

David

 

Sep 13, 2011 at 3:09 PM

Hi David,

Yup, that solved the problem...

  1. Go to Admin>Site Settings>Advanced Settings>Portal Aliases
  2. Add an alias for www.mycloudapplication.com
  3. Restart the web application through Tools>Recycle Application Pool

There is addition step I take to make it work.

  1. Additional Step Needed is to Stop and Start both of the work roles.
  2. Make sure hostHeaders is corrected configure.

Case Solved

Thanks You David :)

Regards,

John

Coordinator
Sep 14, 2011 at 3:20 PM
Edited Sep 14, 2011 at 3:21 PM

Nice to hear that. In principle, the two steps that you mention shouldn't be required. Recyling the application pool is a quick method for refreshing cached settings, but perhaps I'm missing something. 

Thanks for feedback!

Nov 16, 2011 at 9:05 AM

Hi,

I'm experiencing the same problem. I can access my DNN instance just fine using the mysite.cloudapp.net URL, but not using www.mysite.com

I have added both mysite.cloudapp.net and www.mysite.com to the hostheaders tag in web.config and I have added www.mysite.com to the list of portal aliases. I have also set the Portal Alias Mapping Mode to Canonical and I have checked the Auto Add Portal Aliases option - in case either option can create the problem. My domain name is using a CNAME record to map to the Azure service.0

Any ideas?

All the best,
Rune

Nov 17, 2011 at 9:42 AM

Update,

I read the solution properly and removed the hostheaders setting in web.config and added it to the service configuration file as described. However, the problem persists.

All the best,
Rune

Coordinator
Nov 17, 2011 at 10:57 AM

Hi Rune, you catch me on a travel week with limited Internet access. 


Be sure to separate each host name with the ";" character (some people used comma and that raised the same error). At this moment, after changing the hostnames setting on a running service, you need to redeploy the service (there is a workitem on the issue tracker describing this). 

Tell me if this fix the problem.

Regards,
David

Nov 17, 2011 at 11:36 AM
Edited Nov 17, 2011 at 11:43 AM

Hi David,

That did the trick! Thank you very much. (Edit: Redeploying was what did the trick)

Just in case someone else is wondering - select the Deployment in the Management Portal and click Upgrade. Then select the package from your Azure store and the configuration file that you have just modified.

Have a continued nice trip.

All the best,
Rune

Nov 17, 2011 at 12:20 PM

But it was not to be...

Since my domain names now resolve correctly, I thought I'd be smart and set the settings in the portal admin options to "Redirect" and then selected www.mysite.com as the default site. I need to do this in order for my certificates to work. Now I cannot log in anymore. None of the user names work, including the host and admin users. Hence I cannot even revert the setting.

Any ideas as to why this is happening?

Thanks again,
Rune

Nov 17, 2011 at 2:17 PM

Update,

By chaning the portal settings directly in the database, I have been able to revert the "Redirect" setting and I am now able to log on. But, I can only log on when I use the mysite.cloudapp.net URL. If I try to use www.mysite.com, I can still not log on. When I enter a user name and password, the URL changes to my default "logged in" page, but the "Login" page is showing.

All the best,
Rune

May 29, 2012 at 11:30 PM
Edited May 30, 2012 at 5:19 AM


I seem to be having the same problem. The Azure Domain and the Custom Domain are both added to the service config file(Seperated by a Semi Colon). I've created a portal alias and the mapping mode is set to canonical. When I try to access the site via the custom domain I get a 403 error.

What I was missing.....

Download the Azure Storage Explorer http://azurestorageexplorer.codeplex.com/ here. Open up your blob storage and edit the cscfg. Add your custom domain to hostheaders section. There is no need to add them to the web.config hostheaders. Once teh cscfg has been modified you'll need upgrade the deployment through the management console.

I was trying to skip a step, I was selecting the deployment then trying to Configure the file, live/hot.... apparently that doesn't work.

Good luck,

Bond

Coordinator
May 30, 2012 at 7:38 PM
Edited May 30, 2012 at 7:39 PM

Hi @coderbond,

The new 6.2 release makes the DotNetNuke website the default website, so there is no need to specify hostheaders any more. The implementation of RoleEnvironmentChanging event to handle "live" changes on the configuration file is still pending.

Regards,

David