CFRONT.Dll and ASP.NET help needed.

bbgajjarbbgajjar Member Posts: 12
Hi,

I am trying to make ASP.NET application which takes data and insert into NAV Native database.

When i am trying to execute my application I am getting exception ...

The Navision CFront initialization failed, with following error: Exception of type 'System.Exception' was thrown.. Please verify that CFront.dll/CFrontsql.dll are available and located in the directory where the application is started

I really don't understand "directory where the application is started" term.
I have tried to execute application comes with SDK at C:\Program Files\Microsoft Dynamics NAV\60\SDK\CFRONT named DotNetSampleApplication and tried to give path of database ie. c:\database.fdb . Same error I encountered.

Will you please help me to solve this issue as I am stuck with it? Without connecting database I cant do anything.
Is there any alternative available?

Please guide me. Attached is error i am getting while executing DotNetSampleApplication.

Thanks,
Bhavin

Comments

  • bbgajjarbbgajjar Member Posts: 12
    Hi,

    I Got partial solution.

    If you are developing Windows application in .NET then put CFront.dll inside folder where your application .exe is being generated i.e. bin/debug folder.

    In case of ASP.NET application it will be .exe file of your temporary web server i.e. WebDev.WebServer.exe at C:\Windows\Microsoft.NET\Framework\v2.0.50727 in case of running from VS 2005 (kindly check with other versions). If application is hosted in IIS then it need to kept at C:\Windows\System32\inetsrv with w3wp.exe

    But now in ASP.NET I am facing below error...

    Couldn't connect or open the database, verified that database exist, servername is correct and connection and database is closed before connecting. If multiple Dynamics NAV versions are installed, then remember to set the NavisionPath to the correct client files. Error thrown is : Error Code: 3080193 - Error Message: Error 1 in module 47

    OR

    Couldn't connect or open the database, verified that database exist, servername is correct and connection and database is closed before connecting. If multiple Dynamics NAV versions are installed, then remember to set the NavisionPath to the correct client files. Error thrown is : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Code is..

    CFrontDotNet.DriverType = NavisionDriverType.Native;
    CFrontDotNet.NavisionPath = "C:\\Program Files\\Microsoft Dynamics NAV";
    CFrontDotNet.Instance.ConnectServerAndOpenDatabase("leap", NavisionNetType.NativeSecureTcp, "C:\\Database\\database.fdb", 20000, false, true, "", "");

    This works nice with windows applicaton but not with web application.

    Can anyone clear me on this? Help me out guys...!!!???

    Thanks,
    Bhavin
  • bbgajjarbbgajjar Member Posts: 12
    Hi,

    I have open DATABASE.FDB file from NAV Classic and some one is working on it. Now with my ASP.NET application or say windows application another person is trying to connect to same database.fdb whether in same network or other network.

    Is it possible to access .fdb same time as mentioned above?
    I am facing error that database in use or not closed properly. I am able to open .fdb in nav classic but not with .net application at same time.

    Please guide.

    Thanks,
    Bhavin
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • sameerarsameerar Member Posts: 63
    HI

    Read this Blog Post and get some Idea about it.
    http://navdevelopers.blogspot.com/2010/ ... -page.html.

    If you have any query . Contact me.
  • marklynchmarklynch Member Posts: 3
    I am using Zet Excel platform
    Try it
    It helped me a lot !
Sign In or Register to comment.