Authentication error

subhaster
subhaster Member Posts: 64
Hi,

I'm trying to access data from Navision through the CFrontDotNet.dll methods, to fetch data, i.e., read-only.

The code that has been used is as follows:
private bool connectToNav()
  {
      NavisionDriverType driver = NavisionDriverType.Sql;
      CFrontDotNet _cFrontDotNet = new CFrontDotNet(driver);

      _cFrontDotNet.ConnectServerAndOpenDatabase("server name", NavisionNetType.SqlDefault, "database name", 32000, true, true, "username", "password");

      return(true);
  }

The error that I get here is:
Microsoft.Navision.CFront.CFrontException: Error Code: 1246487 - Error Message: You do not have permission to run the 'C/FRONT' System. Contact the system manager if you need to have your permissions changed.

I have tried using Windows authentication as well as Database authentication (sa) but in both the cases I keep getting this error.

I am trying to invoke this method from a web service.

If I use the same piece of code as part of a Windows application. it works fine. The problem happens when a web service or any web application comes into the picture.

Help is appreciated.
Subhasish Chakraborty,
Systems Analyst,
MBS Dynamics.

Comments

  • ayhan06
    ayhan06 Member Posts: 210
    place your licence file into appreciate location for web service.
  • kine
    kine Member Posts: 12,562
    1) You need to have C/Front granule in used license file
    2) User account used to login must have assigned permissions for System object C/Front
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.