I have some app services and processes in the back that the target it's the machine name (hostname) where the app service it's hosted. I realized that when I go to the console in the service app, the hostname keeps changing for some reason.
I would like to know if there is a way to set a static hostname.
Thanks in advance
The machine name changes because you have multipul instances(machine) of your webapp. If you have only one instance, the machine name will not change.
If you want to keep multiple instances, you can disable the ARR affinity feature of the webapp.
Reference:
Disable Session affinity cookie (ARR cookie) for Azure web apps
Are you running on multiple instances? (Check Scale-out blade of the WebApp). When you try to access the Kudu site, it can go to the Kudu of any of these instances. Which is why you'd see the hostname changing. You can go to a specific instance using ARR Affinity cookie, but you wouldn't have control over the hostname itself.
Related
I have Azure App Services behind the Azure Application Gateway/Firewall. There are few application that talks between them. Does that applications talk internally(using xxx.azurewebsites.net) or they talk with public domain(mydomain.com)?
Also, how to check these things in logs.
Current configuration:
HTTPSettings: Pick hostname from the backend address has checked.
Probes: pick hostname from backend https settings has checked.
To answer your question, No if your applications are inside azure's network, it usually wont go through the public domain. But it will go through the firewall/gateways and follow the same networking restriction you have defined.
What logs you want to check? if you want to see the application event logs you can do it using scm. You can access it via Diagnostics/Advanced Tools in your azure app services.
You can enable Access Logs in the Application gateway to see all the request that hits Application Gateway. It has the hostname field where you can check how the site is being accessed.
Let me know if you have any further questions.
I am planning on using an outsourcing team for data processing and want to avoid them downloading or storing client data on their local machines. To facilitate this, I want to create an Azure VM in which they can do all their work (msoft office, etc.) and access an ASP MVC app hosted as an app service in Azure. The MVC app is integrated with the corporate AD and for the outsourcing logins I want to see if the request is coming from my VM or the internet (the latter gets denied). So far I have:
Created a ASP MVC5 app and an Azure VM
Connected the two via VPN (point to site)
When I attempt to go to the public URL for the website on the VM, I get the "this page can't be displayed" thing, which leads me to believe I'm on the right track (now I have to update the hostfile of the machine to the private IP of the mvc app service app?). How do I do the following:
Connect to the app service via web browser (this needs to be over the vnet so that I can pick and choose in the app code who can login outside the network)
Get the network ip of the app service so I can update the VM hostfile
Am I on the right track here? Thanks in advance!
Your understanding of Azure App service is not accurate. Azure App service cannot be accessed via a private IP. They already sit inside a private vnet. They can be only accessed via public hostname with a common DNS name (azurewebsites.net)
Your scenario requires the Azure Web app and the VM to reside in the same VNET, which is not possible. There is another offering called ILB ASE, which allows you to do this. But it's a more elaborate setup. See this for more information: Using ILB with AN ASE
In your scenario you can restrict access to the web app via IP Restrictions module. See this article: IP & Domain Restrictions in Azure App Service
I understand this not the solution u wanted. What you want can be achieved via ILB ASE, but that is an expensive and elaborate set-up.
HTH
you may want to try using cloud service, though MS recommends App Service, you requirement doesn't fit into App service..
Official documentation from MS: https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-startup-tasks-common
Block a specific IP address
You can restrict an Azure web role access to a set of specified IP addresses by modifying your IIS web.config file. You also need to use a command file which unlocks the ipSecurity section of the ApplicationHost.config file.
I am trying to setup IP Based SSL instead of SNI SSL on an azure Web App.
The App Service Plan is Standard S1, but unfortunately I am getting the following error message:
There are no IP addresses in the App Service Environment that are available to be assigned to your app.
What are the possible options?
I believe moving the current Web App to a different App Service Plan in a different resource group would solve this issue. I Have already tried moving the App service plan to a different resource group but failed.
Note: Clicking the scale up button doesn't work and shows a JavaScript error in the console
JavaScript Error found in Chrome console
Byron is correct that this is a bug in the UX.
A fix has been made and should be live later today.
Your app is being hosted in an App Service Environment.
Looks like the scale up bottom is not working and that is probably a bug in the UX.
As a workaround you should be able to go directly to the App Service Environment that is hosting your app and perform the scale operation there.
once the scale operation in the App Service environment is done and the new IP Address is added, then you should be able to come back to the SSL binging UX in the app and try this again.
How can I maintain users to get redirected to the same Server in a Load-Balanced Web Apps
Your answer will be very helpful
Traffic Manager directs the user to the appropriate region, but assuming you have your web app scaled out to at least two instances, ARR (Application Request Routing) is what directs each request to a specific instance of the app.
ARR has a feature called Session Affinity which is enabled by default. It uses an ARRAffinity cookie to attempt to route all requests from a client to the same instance of your application. I say "attempt" because, the cloud being what it is, instances of your app can come and go due to autoscaling or maintenance activities.
Your best bet is to use Azure Traffic manager. When setup correctly it will route users to the proper cloud service in their region and provide them with the best possible experience.
More information can be found here
Azure Traffic Manager
Azure Traffic Manager Documentation
Traffic Routing Methods
When deploying multi-instance WebRole to Windows Azure Emulator, the Emulator is running multiple IIS Express instances of the WebRole, each one on a reserved local IP, like:
127.255.0.1
127.255.0.2
127.255.0.3
The problem is that i want to access the WebRole as if it was really deployed on Azure, i need to check that Session State is persisted between instances.
Since my Session Id is stored on a cookie, each time i'm connecting to a different instance i need to manually 'inject' the cookie to the request to check session data (since the browser considers the IP of the next instance as different domain).
Is there a way i can use a hostname (on a Windows 7 machine) that will point itself randomally to one of those IP?
Well, apparently the emulator does load balance all request between instances:
Clicking 'Debug' on the Cloud Project will open a web page with an IP that is the virtual Load Balancer (usually 127.0.0.1:80 if not taken already).
Yet, there were 2 things that misled me in the first place:
1. The list of multliple IIS Express instances each with it's own binding (image attached).
2. Implicit Affinity:
I made the my web application output the instance-id and kept getting
the same instance-id all the time. the reason for that is (i guess)
the affinity that the emulator enforce (probably using cookie
comparison).
Conclusion:
If you want to manually load balance or to control the affinity yourself, you can leverage IIS Server Farming capabilities (as i did eventually) to emulate load balancing.
(Apache/Nginx as some kind of 'Reverse Proxy' is also a good option, but i preferred to stick with products that are already installed and in-use).