Can't get a connection in .net web application using CFRONT

elvis
Member Posts: 5
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?
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
-
I'm not sure what you mean by "CFRONT proxy component for .NET usage v1.2" In my ignorance I just added a reference to the COM object in my .Net project and everything works fine. The only anomaly was that when I added the line
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.0 -
Ian, thanks for responding. I am using the OpenDatabase method to ensure that it wasn't the login part causing the problems. Once I get this working I will move to the newer method.
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.0 -
Elvis, Actually I've done all my cfront stuff in a class library because I want to use the same functionality in both windows forms and web forms apps - but it works for both and for both SQL and proprietary databases.0
-
Ian,
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?0 -
I'm now in same troubles, have you any ideas since your last post on this?0
-
The following is the response from MBS, which made it work perfectly.....
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.0 -
Thank's its working now nearly perfect0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions