We were able to find the issue. It seems like the azure.webhost.exe version that I was using was not compatible with serviceBus function (atleast it didn't work for me). After referencing the last version it started working as intended.