I have a working azure web app, and ran into some issues while creating a new slot for it, the custom domain that is set for the web app follows the pattern:
appname-projectname-webapp-win-ne.azurewebsites.net
But when I created a slot the custom domain for it was created as:
appname-projectname-webapp-win--slotname.azurewebsites.net
Missing the ne on the domain, so my questions are:
Is there any known reason to why that part would be removed?
Is there a way to change the domain for the slot?
It's being truncated to fit in the allowable length of Azure Web app names (2-59 alphanumerics and hyphens).
See https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb for details.
Related
Map subdomain to virtual directory Azure WebApps
Is this solution still valid in 2021? I'm trying to accomplish the same thing as Tony. We have the "App Service" and I want to map a custom domain to the sub-directory which is a mini-web-app using the main app resources. i.e.
mainapp.azurewebsites.net/pages/mini-app
The issue is that I can't just add a "Web App" to my App Service Plan as described above. If I'm in the App Service view in Azure i don't see an option to add another web app. If I try to add a new App Service it wants me to create a completely new one that is not linked to the mainapp.azurewebsites.net
Any advice?
I'm new to Azure portal and some subjects are still very fresh to me, which means my following question might be basic.
I would like to know if it's possible to have deployment slots associated to an app service that have a completly different sub domain in the URL.
As an example lets say i have this URL defined for the app service:
potato.azurewebsites.net
Now when i create a deployment slot and give it a name, for example tomato
what's happening is that it appends to the subdomain of the app service
potato-tomato.azurewebsites.net
Is there a way to name it only tomato.azurewebsites.net ?
Adding custom domains to the app service help to solve this situation?
When you add the slot to the app service, the URL will always be appservicename-slotname.azurewebsites.net.
If you want it to meet your requirement, as you mentioned, you can add a custom domain for the slot(Note: The custom domain should be added to the slot, not the app service).
I own a domain name and am trying to map it to an Azure Web App that I successfully created.
I created an A record, C record, and Txt (as required by Azure) on Godaddy and configured Custom Domains in Azure (as pictured below). The message I'm getting back now is:
The resource you are looking for has been removed, had its name
changed, or is temporarily unavailable.
Any suggestions?
By looking in https://www.digwebinterface.com/
https://www.digwebinterface.com/?hostnames=dnnappserver.scm.azurewebsites.net%0D%0Asmarttapp.com%0D%0Awww.smarttapp.com&type=&ns=resolver&useresolver=8.8.4.4&nameservers=
Everything seems perfect and even mapping is correct. Even site are working by custom domain :)
I have an Azure Function app running on dynamic pricing and am trying to set up a custom domain.
I have added and verified the domain and setup the CNAME record accordingly. The custom domain shows up correctly as the "URL" when I view the App Service settings in the Azure portal. If I try to use this domain, however (to access an HTTP trigger function), I am returned with "Error 404 - Web app not found."
When I look at the Function URL in the portal, it still shows the x.azurewebsites.net domain, not the custom domain I have added. Is there anything additional I need to do to get Functions working with a custom domain?
Copying from my answer on MSDN forum:
Indeed, custom domains are not yet supported for Dynamic Function plans. This support will come a bit later (no clear ETA to share at this point).
Thanks to #David Ebbo I figured out how to do this for a Function App running in a consumption plan (e.g. Y1). Here is the MSFT docs article:
https://learn.microsoft.com/en-us/azure/app-service/scripts/cli-configure-custom-domain
It seems that it cannot currently be done via the Azure Portal GUI and instead you must use Azure CLI to run the commands. It's easy to do directly from that article page using the "Try It" link to the embedded azCLI.
I'm looking into moving an existing app to Azure. It will have an MVC app in one web role and some WCF services in another web role. When live, the site will live at http://www.myapp.com and the services will be at http://api.myapp.com with the MVC app configured to point to the services at http://api.myapp.com.
The problem is when pushing the app to the "stage" configuration on Azure. My understanding is that each push to stage will cause the services to live at a new url (something random like http://4aa5ae2071324585ba5a902f4242a98c.cloudapp.net/). In this case, what is the best way for my MVC app to discover the url of the services?
One option would be to setup a dns entry like http://stage.api.myapp.com and update my DNS CNAME record to point to the new Azure staging url every time I push to stage, but... yuck.
Another option would be to push to stage, get the new urls for the services, RDC to each instance of the MVC role and manually update the configurations. Also yuck.
Is there a simple way to do this? I know I could automate some of the steps above with something like PowerShell, but I'm really hoping there's something baked into the Azure framework that makes this easy. It seems like it would be such a standard scenario.
The only way to dynamically discover what the staging URL will be is to have the instance check its own deploymentID. I am assuming here that the MVC website and the WCF service are in the same deployment. If you check the RoleEnvironment.DeploymentID, you will find that this corresponds exactly to the 'random' URL used in staging (i.e. http://[deploymentID].cloudapp.net).
As long as you are dynamically creating the ChannelFactory on the clientside, it should be able to take its own DeploymentID and find the staging URL.
Of course, this is only useful when deployed in staging. Why don't you simply use the Production slot? That name is stable and you can rely on it or the CNAME (more likely) that you set for it. You can always have multiple hosted services (dev, QA, prod, etc.) and just use the production slot on them.
Don't do what #dunnry is suggesting! Azure has a really good concept of endpoints that solve your problem. And you have access to this info from your RoleEnvironment class.
You can take a look at my blog post on how to get the endpoint from the client. The key part is to create an internal endpoint at which your WCF service is listening. Keep in mind though, you don't necessarily need a new role for this, and personally, I would rather host it in IIS alongide the original Web role & have two of these roles for improved reliability.
This way, it doesn't matter what the deployment is, because the service communication will take place inside that deployment, be it staging or production.