Cannot access on-premise Web API through Azure Hybrid connection - azure

I deployed a web API at port 8090 on an on-prem server. Created a hybrid connection to on-prem server using port 8090. Status is connected. I deployed an Angular application as a Web App to Azure but AJAX request fails with "Name not resolved".

You need to use the fully qualified name of the server your application is hosted on, e.g. http://server.contoso.com/myservice rather than http://server/myservice as you would do locally.

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 does an azure app service access a no azure web server

I have an Azure app service and in some cases I need to send a web request to a non-azure webserver. What do I need to do to make it possible.
Currently the web request fails with no clear error message.
In response to a HttpClient Put request I get a System.Net.WebException exception which says there were errors.
THe same request works from a desktop application.
If your webserver is reachable from the internet you should be able to access it through your App Service. Try to log a ping to your webserver and google (8.8.8.8).
If your App Service is in a VNET you should enable some outbound rules to your webservers IP adress.
The server I am connecting to is an other Azure service. After some more investigating, It appears that I can connect to it if I do not use SSL (i.e. http://) but the connection is immediately closed when using SSL (https://). I assume that the problem must be related to the use of SSL.

Azure Hybrid Connection to API hosted on Websphere (on premise)

I have an API that is hosted on Websphere Application Server (bound to a specific port), on a Windows 2012 R2 Server (on-prem), that I would like to expose to Azure API Management in the cloud. Ideally, the plan was to use Azure Hybrid Connections. Is that even possible? How could I go about doing this?
You can setup Azure Website and use the Hybrid Connection feature to expose your API via a simple WebApi Controller.
API Management will just talk to the Azure Website. You can limit access to the Azure Website from only the Public IP address of the API Management.

Connect nodeJs app to on-premise server using Secure Gateway

I'm trying to connect from a nodejs webapp to a REST api hosted on premise. I bounded a Secure Gateway instance and created a destination on port 80 to the machine where the SG client for RHEL 6 is running.
The request is still throwing a Timeout exception.
Do I have to modify the nodejs application code in any way or the SG should allow me to access the REST api transparently?
Your Node.js app needs to talk to the Secure Gateway service and not the API directly. Where you establish a connection to your on-premise API, replace the host name and port number with the cloud host name and port number that you were given when you created the destination.
There is an npm module to help your app obtain that host name and port - https://www.npmjs.com/package/bluemix-secure-gateway
And an example - https://www.ibm.com/blogs/bluemix/2015/04/reaching-enterprise-backend-bluemix-secure-gateway-via-sdk-api/

Cannot access Web API in on-premises VNET using Azure Hybrid Connection

I have created an Azure Web App with Hybrid Connection to access Web API on the on-premises machine. When I access the Web API deployed on my local machine (where Hybrid Connection Manager is installed) and connect to it using Hybrid Connection with server/port as MyMachineName/80, it works perfectly fine.
However, when I try to access the Web API on another server that my local machine is connected to over VNET, it doesn't work. In Hybrid Connection I am giving server/port as VNETMachine/5000.
The error that I am getting is:
An attempt was made to access a socket in a way forbidden by its access permissions xx.xx.xx.xx:5000
I ran netstat -o and found there is no application using this port and from my local machine where Hybrid Connection Manager is installed, I can access the Web API directly by simply typing in the URL in the browser like
http://VNETMachine:5000/api/author.

Resources