huysentruitw / SapNwRfc

SAP NetWeaver RFC library for .NET 5, .NET Core and .NET Framework
MIT License
149 stars 43 forks source link

Using SapNwRfc in Azure Functions #38

Closed konradsteynberg closed 3 years ago

konradsteynberg commented 3 years ago

Hi,

I am trying to use this inside an Azure Function. Locally on my developer machine it works fine and I cant see anything wrong. I have verified that I have access to the SAP server using tcpping. Making a call to SapLibrary.EnsureLibraryPresent() also works, even in Azure, but as soon as I call Connect() the process simply stops and azure starts it up again. Trying to catch it as an exception also reveals nothing and when remote debugging the process also ends as soon as I call Connect().

I am unsure where to look for problems next.

Regards

huysentruitw commented 3 years ago

I don't have experience with Azure Functions, but it could be a 32 vs 64-bit issue. I have only tested this library with 64-bit SAP DLL's, so when running it in Azure AppService f.e., you need to explicitly configure the AppService in the Azure portal to run as 64-bit (as 32-bit is the default).

Buffelstoot commented 2 years ago

Hi @konradsteynberg, @huysentruitw , did you figure out what was causing the issue? I'm having the same problem when deploying to an Azure Function. it's not a 32 vs 64-bit issue. Application crashes on 'connection.Connect();' and I can't seem to find any decent error message...

My function app returns the following: 502 - Web server received an invalid response while acting as a gateway or proxy server.