Azure webapp to local server - azure

I have a web application mounted on azure webapp is an api on node and I also need you to consume a service of a esp8266 wifi module but this module has a server with a local ip mounted, I need this azure app to connect to this local server of the Wi-Fi module.
NodeAPP in Azure ->>> Modulo Wifi (ESP8266) in local Server

Usually when I have this kind of requirement, the easiest way to solve is by using Ngrok. Then, your web app will send data to ngrok, which will forward it to your local pc.
More info: https://ngrok.com/

Related

Application deployed in Azure VM

I have a react application deployed using an Azure virtual machine. To access the app I need to use configured DNS, for example, "http://XYZ.eastasia.cloudapp.azure.com:3000". However, I don't want to include the port num in the URL. How can I port forward in azure so that only by typing 'http://XYZ.eastasia.cloudapp.azure.com' should be enough to access the application?
If you want to users access your app by URL: http://XYZ.eastasia.cloudapp.azure.com, you should run your react app on 80 port. Refer to this post to specify a port to run react app.

.net Core service accessing serialport from remotedesktop session

I have a .net core 3.1 service running that is using a custom Com dll that is talking to a machine connected on a serial port(serial to usb cable). The service is hosted on a windows 2012 server.
A user is then opening a remote desktop session to the server and forwarding the local serial port where the machine is connected to. When we run the service as a service the custom Com dll cant talk to the forwarded port, but if we run the service as a standalone, not as a service, (kestrel) session inside the remote desktop session it works fine.
Cant a windows service(or IIS service) communicate with a serialport that is forwarded using remote desktop port forward? is the port only available in that "session" and not accessable from the service context?
We have tried to run the service as the current users, local system, network system etc.. we have tried to run the service hosted in IIS and regular window service, we also tried to run it as a scheduled task but with same result.
Anyone have any idea on this?
Thanks in advance!

Connecting to Azure VM from Azure App Service

I have an Azure virtual machine, on which a process listens on a certain port. A Node.js application on my local computer is able to connect to this process using the VM's public IP address. But the same Node.js application, deployed as an app service on Azure, is apparently not able to connect using any IP address, despite the fact that the VM allows all incoming traffic on all ports.
(Details: The VM process is running "q" (kdb+), and the Node.js application is using the "node-q" package to connect to it. Both the Azure VM and the Azure app service are Linux, but the local version of the app service is on Windows. The Azure app service is able to connect to my Azure SQL database.)
Any insights into this problem would be appreciated.
There are many reasons for Bad gateway error, probably you could verify these factors on your side:
Azure VM side. Make sure the Azure VM is running and the process port is listening when you request a connection from an application. You could run sudo netstat -plnt on Linux VM to check the listening ports. Or, a server can crash if it has exhausted its memory, due to a multitude of visitors on site or a DDOS attack.
Firewall blocks a request. You should allow all incoming traffic or Azure web app service outbound traffic on this listening port on the VM. In this scenario, you could verify the Network Security Group configuration for the VM and firewall inside the VM if you have. You could find NSG settings by clicking Virtual machine--Settings---Networking---inbound port rules on the Azure portal.
Faulty programming. It seems the Node.js application could work locally.
Temporary issue. Sometimes, there is no real issue but your browser thinks there is one thanks to an issue with your browser, a problem with your networking equipment, or some other reasons. You could refresh your web browser or clear cache and cookies to get the page back what you are looking for. More details you can refer to fixing 502 error.
If you still have any question, feel free to let me know.
It was faulty deployment. I didn't include all dependencies in the upload to Azure. Thank you.

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/

running a wcf service on an Azure VM

I can browse to it from the local desktop on the server, I setup my endpoints in Azure for port 8053, I can't hit the url remotely though. I assume it's myservice.cloudapp.net:8053/service.svc.
Did I miss a step?

Resources