I'm stuck at the first hurdle.
I've managed to get a connection using the "CFRONT proxy component for .NET usage v1.2" within a .net windows application (a simple form with a button that initialises the proxy and then calls opendatabase), but can't get a connection within a .net web application. I keep getting "The Server Threw an Exception".
Any ideas what I'm doing wrong?
0
Comments
CFRONT cf = new CFRONT();
the intellisense automatically added new CFRONTClasss(). Get rid of the 'Class' and it all seems o.k.
Also - I used the ConnectServerAndOpenDatabase method rather than separate methods because I'm writing an app that has to connect to both SQL and proprietary systems.
Is your project using windows forms or web forms? Mine seems to work in a windows form project, but not a web forms project.
For your information, the "CFRONT proxy component for .NET usage v1.2" is an available download that removes all variant parameters for .NET compatibility.
I've created a class library that works fine in a windows app, but still can't get it to work in a web app.
Would you happen to have any examples that I could use to test on my machine?
I found out that in order to use CFRONT.ocx in this way, it needs to be installed as a component service. I followed these steps to get it working:
Open Component Services (from Administrative Tools).
Expand to Computers, My Computer, COM+ Applications. Rightclick COM+ Applications and make a new one. In the wizard, create a blank application, just enter a name.
Doubleclick the application you just made, then click Components. Open Windows Explorer and find CFRONT.ocx (C:\Program Files\Microsoft Business Solutions-Navision\SDK\CFRONT\Cfront.ocx). Drag it into Components. Once it is there, restart the WWW Publishing service, then right click My Computer in Component Services and stop MS DTC, then start MS DTC again (alternatively, just reboot). Let me know if you get stuck with this.
I got the web application to bring back data from Navision. I did remark the CloseTable, CloseCompany etc, but I think that these lines failed for some other reason.