App Services on VNET


When setting up an app service, including azure functions, you can have it reside on a vnet so it can access internal resources like a database. Often time though you'll run into some problems routing to the database, specifically because of DNS. There are some good tools for debugging the connection.

First off you'll need to open a console to the app service. I do this using the kudu tools but I think the console exposed directly on the portal works too. The standard tools can't run in the restricted environment provided. However there are a couple of tools you can use in their place.

NSLookup - > nameresolver.exe - run it with nameresolver.exe ping -> tcpping.exe - run it with tcpping.exe

If you're seeing DNS issues you can override the DNS server with the variables WEBSITE_DNS_SERVER and WEBSITE_DNS_ALT_SERVER. These two are entered in the app service config settings

One of the most typical problems I've encountered is that the app service isn't routing requests properly unless you add the app setting WEBSITE_VNET_ROUTE_ALL=1.

Simon Timms

Email Email
Web Web
Twitter Twitter
GitHub GitHub

Looking for someone else?

You can find the rest of the Western Devs Crew here.

© 2015 Western Devs. All Rights Reserved. Design by Karen Chudobiak, Graphic Designer