VFP6 Com DLL not working in vs2012 .net framework 4.5 MVC 4 web application

0

I am using a COM DLL (type library) created using vfp6 in my MVC 4 application for data manipulation with FoxPro DB data-tables. I can able to register the dll successfully using Regsvr32 and also can able to do references in my project.

In my web application i can able to create an object for the class of COM dll but not able to access its properties or methods. I got iisexpress.exe has exited with code -1073741819 (0xc0000005) access violationerror when run the project from visual studio(admin mode) with debug. If i run the project without debug i got "System.Runtime.InteropServices.COMException: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) exception.

Dim objCOM = new foxprocom() // this creats the instance without any issue

objCOM.Path = "my path" -- this line throws the errors

Earlier i used the COM dll which was created using vfp9, that works fine but this version using vfp6 is not working. Is vfp6 COM dll compatible with .net 4.5?

Please help me to solve this issue.

.net
visual-foxpro
asked on Stack Overflow Jun 24, 2016 by Siva • edited Jun 24, 2016 by Piyush Gupta

2 Answers

0

You might do well to ask this question in the support/user forum at West Wind Technologies web site. There are many users there who have worked with FoxPro and .Net together, especially the notable Rick Strahl who is a master at this kind of stuff.

http://support.west-wind.com/

answered on Stack Overflow Jun 25, 2016 by MattSlay
0

Simple answer is no. Years ago I ran into issues with VP6 .dlls no longer working on Server 2008 - Server 2003 worked just fine. The issue is with more recent versions of IIS and COM object permissions. I would highly recommend using VFP9 to build your COM .dll, a lot has changed with how COM objects perform security clearances through Component Services since VFP6. Regsvr32 will register your .dll into the registry, but that is no longer enough. Using Component Services, you need to create a new COM application and then add your compiled .dll and .tlb files as a new component. You can then assign a "user" account and password to your COM object to ensure that it has read/write access to any directories and databases that you need. Also make sure you right click Foxpro9 and select Run as Administrator before you compile your dll.

answered on Stack Overflow Jul 18, 2016 by Dan Ross • edited Jul 18, 2016 by Dan Ross

User contributions licensed under CC BY-SA 3.0