On IIS I can configure my web-service with Application Initialization, AlwaysRunning and Preload enabled to make sure the first request is fast enough. Now I am trying to create a similar web-service within Microsoft Azure. However, the first request is exteremely slow. I tried to speed it up using "Always on", but this doesn't work. What configuration is needed to make sure the warm-up works correctly in Azure?
I would like to make Azure react the same way as IIS when restarting the application or refreshing the web.config. Besides the "Always on" functionality, I can't find the settings that are needed to do this. I have searched on other pages, but most solutions are about the warm-up of a website page. Is there a (simple) configuration to use for the warm-up of a web-service within an Azure app service?
Have you enabled Preload?
When you create the Web Service Application in azure...
Under Settings, Configuration, Path Mappings..
Related
I have a web application that is currently running on IIS in 3 Azure VMs. I have been working to make my application App-Services friendly, but would like to test the migration to App-Services in a safe / controlled environment.
Would it be possible to spin up the App-Service and use an Azure Load Balancer to redirect a percentage of traffic off the VM and onto the App-Service?
Is there any other technology that would help me get there?
You might be able to achieve this if you are using an App Service Environment and an internal load balancer
https://learn.microsoft.com/en-us/azure/app-service/environment/app-service-environment-with-internal-load-balancer
However, based on your description of your current setup I don't believe there is an ideal solution for this as a standard load balancer only allows for the backend ports to map to VMs. Using an Application Gateway might be another option as well
https://learn.microsoft.com/en-us/azure/application-gateway/
I would suggest you make use of the deployment and production slots available that comes a Web App. Once you have the webapp running in the dev slots, test the site to ensure all works as expected. Once it does, switch it to the production slot and reroute all traffic from the VMs to the App Service.
All in all, running an app on a Web App is quite simple. Microsoft takes away the need to manage the VM settings so you can simply deploy and run. I don't see you having any issues simply migrating. The likelihood for issues is small. You can also minimalism it by performing the migration during off hours in case you need to make any changes.
There is also some Web App migration guidance you might find useful
https://learn.microsoft.com/en-us/dotnet/azure/dotnet-howto-choose-migration?view=azure-dotnet
I am using application insights on an on-prem server in our corporation. I have set up the key and everything works when I run it on my machine. However, once I put it on the production server, it does not work.
I have run PerfView to see what the issue might be. Of course, it is not making a successful http call to Azure. So I need to figure out how to set up a proxy for the Application Insights part of my application. Every tutorial that I have found only talk about how to do it for .Net Framework and not .Net Core.
Does anyone have some sample code on how to accomplish this?
https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Custom-Configuration#redirect-traffic-to-the-different-endpoint - You can override endpoint to any custom endpoint you have. Ofcourse, the code running in you endpoint should forward data to the original backend.
I dont think Application Insights allows user to specify proxy settings. You can have a proxy configured for your entire server, but not specific to application insights.
I've got an ASP.NET MVC site hosted as an Azure Web App and I've noticed that once the site has been idle for a while, when hitting it the application reverts to a deployed state.
Now traditionally, I would solve this problem by setting the Idle Timeout of the application pool in IIS to 0. However, given that I don't have ready access to do this with an Azure Web App I'm struggling to find the equivalent.
I did try the "Always On" setting which appears to be what I'm looking for, however it seemed to make absolutely no difference unfortunately.
Always On. By default, web apps are unloaded if they are idle for some
period of time. This lets the system conserve resources. In Basic or
Standard mode, you can enable Always On to keep the app loaded all the
time. If your app runs continuous web jobs, you should enable Always
On, or the web jobs may not run reliably.
From https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-configure
Make sure you're running in the right price tier (Basic / Standard).
I have a Node.js script that I want to run in Azure on a Web app.
This script is not an express web site, rather it's a worker script which polls a database for work to perform, and when done it just polls and waits, e.g. there is not user interface for it.
I notice that after deploying it, even though it's setup with iisnode, it won't actually start until I fire up a browser and navigate to the Azure Web app host, even though it doesn't have a UI.
Only when I navigate to it does iisnode start logging and fire up my application. Then it happily polls the database and performs the required work.
Does anyone know how you can make a site just automatically start when deployed?
There seem to be autostart web.config settings available with IIS, but I don't know how to get iisnode or the Azure Web app to support it.
I could set up a Web job on the machine that just performs a GET from the site, but that seems a bit of overkill and messy.
You can leverage Function App to satisfy your requirement. Also, your original solution which build an Azure Web App without UI should be work.
However, please pay attention that Azure App Services will be unloaded after they have been idle. You can enable the Always on application setting to keep the app loaded all the time. Please refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/#application-settings for more details.
Any further concern, please feel free to let me know.
I need to create 3 separate and independent versions of my ASP.NET WEB API and host them all at the same port and in the same IIS.
So, let's assume that my current API runs at:
http://xxx.xxx.xxx.xxx/api
I need to replicate it to
xxx.xxx.xxx.xxx/test/api
xxx.xxx.xxx.xxx/dev/api
but it is very important that each one will have it's own configuration on IIS.
The reason for that is that I want each "version" of the API to have a different connection string.
Of course this will have to be done with out any change in my current code, just via IIS setup.
You can create applications under an IIS site to accomplish this. You can even use WebDeploy to deploy them all. Follow this blog post -
http://dotnetcatch.com/2016/03/03/simple-service-versioning-with-webdeploy/