Testing subdomains in azure setting

I just added a new scope to my MVC app hosted in the Azure Web role that uses Attribute Routing to access subdomain controllers for routes with subdomain prefixes. On azure emulator this works great and I can push the correct controllers using my development url (for which I have an entry in the host file)

host file entry: 127.0.0.1 domain.com portal.domain.com

working subdomain: http://portal.domain.com:81/SubController/SubAction

How can I continue testing in a staging environment? At the moment I am using a 3 month free trial and I understand that I cannot add a CNAME or record until I start paying, but I still have 2 months in the trial and just want the app to be WORK ... It doesn't have to look pretty. I don't care if the subdomain url looks like this:

  http://portal.8c72d21eg2c14636s0542f181024e72a.cloudapp.net/

      

Currently thrown out:

 [Fiddler] DNS Lookup for "portal.8c72d21eg2c14636s0542f181024e72a.cloudapp.net" failed. No such host is known 

      

Is there a way?

+3


source to share


1 answer


First, as you noted, there is no limit on CNAME Cloud Services

.

Secondly, I highly recommend using the framework production

even for testing / setting tasks, especially when developing / testing. The only difference between cloud services staging

and production

is that you get a domain name fixed/stable

for your production environment (i.e. mygreatapp.cloudapp.net

), while you always get a different GUID-like domain to set up with each deployment (i.e. 8c72d21eg2c14636s0542f181024e72a.cloudapp.net

). Besides, everything is the same - billing, networking, resources, everything.



Given the specifics, you understand that you need to create a new CNAME every time you deploy a new version (if you deleted the old stage) into the stage, because you will be presented with a new GUID-like domain.

So, create your cloud service, CNAME domain in your domain, deploy it to a production

slot and live happily after;)

+2


source







All Articles