Issue occuring in Azure function app but not in webapp #161
-
Hi, I am trying to use Yanco connector in my azure function app in .netcore and I am getting exception on System.Threading.Tasks.Datafow when calling BAPI in SAP. But when I use the same code as webapp, i am getting results correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @hemanthaar , I converted this to discussions as it looks more like a dependency issue of Azure functions. YaNco uses dbosoft.Functional for some core functional features. Dbosoft.Functional depends currently on System.Threading.Tasks.Dataflow Version 5.0. There are some known issues for dependencies of Azure functions apps related to System.Threading.Tasks.Dataflow. Depending on the version of Azure functions you may have to use a binding redirection (https://thewissen.io/azure-functions-binding-redirects/). But that's not a easy task. I personally prefer the new isolated azure functions as they are designed to reduce such problems. From the architecture perspective I would also recommend not to use any kind of SAP connector directly in a Azure function as it can scale almost endless and that not something SAP is designed for (connection limits, etc.). Please see this project for a reference architecture: https://github.com/dbosoft/SAPHub. Hope that helps to point you in the right direction. In case you asking for more detailed information please post your Azure function version and a sample application with all dependencies used in your project. Please note that we also offer commercial support plans, here you can find more about it: https://support.dbosoft.eu/hc/en-us/articles/360021454080-YaNco-Support-Plans Best Regards, |
Beta Was this translation helpful? Give feedback.
-
Hi, I have tried to reproduce this issue with a minimal project using Azure Functions 3. You can find it on https://github.com/fw2568/YancoAzureFunctionTest/tree/master/YancoAzureFunctionTest2. However I have no problems with any dll and SAP connection is working. I can see on your screenshot that you have warning on assembly level, is this maybe related? It would also help if you can share the file [assemblyname].deps.json from the same directory. It contains details which version each dependency requires. Best Reagrds, |
Beta Was this translation helpful? Give feedback.
Hi @hemanthaar ,
I converted this to discussions as it looks more like a dependency issue of Azure functions.
YaNco uses dbosoft.Functional for some core functional features. Dbosoft.Functional depends currently on System.Threading.Tasks.Dataflow Version 5.0.
It looks like that another version of System.Threading.Tasks.Dataflow is used for your function app.
There are some known issues for dependencies of Azure functions apps related to System.Threading.Tasks.Dataflow. Depending on the version of Azure functions you may have to use a binding redirection (https://thewissen.io/azure-functions-binding-redirects/). But that's not a easy task. I personally prefer the new isolated azure functio…