.NET Development
Do you support calling fox-pro dll from existed .net API
Gravatar is a globally recognized avatar based on your email address. Do you support calling fox-pro dll from existed .net API
  Farag
  All
  Apr 25, 2020 @ 07:24pm

Hi, we have an existed running .net restful API and we need to call a fox-pro dll to pass a parameters and receive an output "with no memory issues". So my question is that can you framework help us ? what are your framework offering in my case ? Also is there is any documentation for my case ? Regards.

Gravatar is a globally recognized avatar based on your email address. re: Do you support calling fox-pro dll from existed .net API
  Rick Strahl
  Farag
  Apr 25, 2020 @ 11:20pm

Most likely no...

FoxPro COM servers cannot be reliably called from .NET Core or from ASP.NET Web API because those frameworks are MTA threaded and AFAIK there's no way to safely call FoxPro STA COM servers from these frameworks.

There are other ways you can make this work, like Web Connection which is a framework specifically built for FoxPro or creating custom COM pools, but using existing ASP.NET Frameworks that are MTA threaded will not let you call FoxPro COM components reliably using just plain COM invocation, due to the cross thread corruption issues.

Here's an old post that talks about the issues you have to deal with - it shows ways for some mechanisms like ASP.NET WebForms, classic ASP.NET MVC, WCF and a few others how to use STA COM components. But it also describes that you can't easily call FoxPro COM components for some others like ASP.NET REST ASMX services, WebAPI etc. and which now also extends to .NET Core.

Creating STA COM compatible ASP.NET Applications

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Do you support calling fox-pro dll from existed .net API
  Farag
  Rick Strahl
  Apr 30, 2020 @ 05:59pm

Thank you Rick, you was really helpful 😃

© 1996-2020