pythonnetwork-programmingazure-data-factory

How to create linked service in Azure data factory for on premise Rest API


I have an on premise API which is only accessible within private network. I have to create a linked service of this API for a client. For testing purpose I created a simple flask API in python running on my local host 8080 port. When I try to create linked service in ADF i get this error:

The connection to the REST service failed. Endpoint= http://local host:8080, Reason=
Access to local host is denied, resolved IP address is local host, network type is OnPremise

How can i resolve this issue? I have created self hosted integration runtime instance for adf as well. I tried adding an inbound rule in firewall for 8080 port, but it didn't work.


Solution

  • I was able to resolve this issue. In cmd change directory to C:\Program Files\Microsoft Integration Runtime\5.0\Shared> and run these command as admin:

    .\dmgcmd.exe -DisableLocalFolderPathValidation

    .\dmgcmd.exe -EnableLocalMachineAccess

    Also you need to add inbound rule in firewall for your port of API. In my case it is 8080 and the connection test was successful in ADF.

    enter image description here