How to find the IP address of the user who accessed my web application deployed using Azure App Service? - azure

Recently, I deployed a web application using Azure App Service. It's in the free tier service plan. I would like to access the logs of this web application and the IP address of the users who accessed my web application. How to find this information?

You'll need to enable Application Insights and use Web server telemetry
https://learn.microsoft.com/en-us/azure/application-insights/app-insights-data-retention-privacy
https://learn.microsoft.com/en-us/azure/application-insights/app-insights-asp-net

Related

Azure web app uses IP outside of the outbound IP range

I have a .net core web application deployed as an Azuere web app. This web app makes an API call to another web application deployed on-premise. The on-premise web applciaiton logs the IP address of the client applciation.
When the Azure web app makes an API call to an on-premises web application, the client IP address logged is different than the range of outbound IPs defined for the Azure app. I alwyas thought that the Azure web app uses one of the outbound Ips while communicating with other applciations. This does not seem to be the case.
I have added my Azure Web app to vnet. Does this have anything to do with the above observation?
Is there a proxy used by the Azure when Azure Web app makes external calls?

How to setup IP restriction for Azure Web App via Azure App Service

I am trying to setup IP restrictions in Azure for both an App Service and a Web App. From the documentation here https://learn.microsoft.com/en-us/azure/app-service/app-service-ip-restrictions I got the impression that setting the IP restriction on an App Service level should be sufficient and cover all possible Web Apps that the App Service might contain.
However, I find myself having to setup IP restrictions on both levels e.g. App Service and Web App.
Does anyone know if it's possible to setup IP restrictions on an App Service level and have it "apply" for all Web Apps?

Access Azure App Service RESTful endpoints from On Premise resources using VPN

I have an on premise desktop application and I need it to hit Web APIs I have living in an App Service Web App (on an App Service Plan) in Azure.
My on premise resources are connected over a site to site VPN and I was wondering if there is a way I can call these Web API services(in an app service) directly over the VPN instead of going to the public endpoint.
The "normal" App Service Plan exists in a multi-tenant environment so this is not possible. You would need to use an ASE (App Service Environemnt) to use advanced networking features like VPN and NSG.

How to make Azure Web Api project REST endpoints only available to Azure virtual network

I have a .NET Web Api project with several REST endpoints that I only want accessed by resources from within an Azure virtual network I have created. Resources such as Azure Functions and Azure Web Roles will access these endpoints only. In other words, I do not want the endpoints publicly available.
So, I configured the Web Api application with my virtual network but apparently I also need to add the Web Api application to an Application Service Environment (which are quite costly from what I have read). To quote the Azure documentation:
VNET Integration gives your web app access to resources in your virtual network but does not grant private access to your web app from the virtual network.
Do I indeed need to use an Application Service Environment and just deal with the costs or is there another way I can achieve what I want?
I do not want the endpoints publicly available.
Until now, Azure web app only supports for using an internal load balancer with the app service environment feature. If you want to make your Web API can only be accessed internally. An app service environment is required.
If you don't want to move your Web API to app service environment and your Azure function and web role have fixed ip addresses, you could configure the IP whitelist using ipSecurity configuration in your web API. For more information of ipSecurity, link below is for your reference.
IP and Domain Restrictions for Windows Azure Web Sites

microsoft azure hosted database and firewalls

I am doing mobile development on Xcode and using hosted database from Microsoft Azure.
I noticed there is firewall settings on Microsoft Azure in order to add clients.
How will this work when the mobile app is deployed? Should all ports be opened on the database? Or do I need to use Web Services?
How will this work when the mobile app is deployed? Should all ports
be opened on the database? Or do I need to use Web Services?
You should definitely NOT open all ports and direct connectivity to the database from mobile apps is strongly discouraged.
Recommended way would be to use some kind of service layer sitting between your mobile app and the database. All the requests from the app should go to this service layer which will perform database operations. This service layer could be deployed as Azure Mobile App Service, Azure API App Service or a Web API hosted in Azure Web Apps Service.

Resources