NET·Conductor Frequently Asked Questions
The following are frequently asked questions about the NET·Conductor. The answers to these questions may help you in using the NET·Conductor.
- 1.0 Introduction
- 2.0 Regarding Installation
- 3.0 Regarding Setup
- 3.1 All my .asmx pages show 'page not found'. What is wrong?
- 3.2 My MiddleTier (MT) can't find a DataTier (DT) that is running.
- 3.3 My NAS is experiencing problems connecting. I keep getting a message saying that my server version is different?
- 3.4 Accessing my .asmx pages gives me '<%@ WebService Language="c#" Codebehind="..." Class="..." %>'. What is wrong?
- 3.5 "The country code in the license file does not correspond to the country code (GB) in the STX file."
- 3.6 Why is my DataTier not available?
- 4.0 Regarding Licenses
- 5.0 Regarding Running the NETConductor
- 5.1 For no apparent reason, my NAS is crashing on me every now and then?
- 5.2 How would I restart the NAS automatically if it crashes?
- 5.3 My NC is running really slow, it works but it is dead slow. What is going on?
- 5.4 My NC runs very well, but when it is left alone for 8-10 minutes, it breaks down.
- 5.5 I get the "YOU MUST CONVERT THE DATABASE TO THE NEW VERSION..." error when I try to start the NET·Conductor DataTier
- 5.6 The message "The definition of the field User ID was changed after the object was saved. Old type: Code, New type: Text" pops up randomly when using the NET·Conductor
- 5.7 Works fine with Client but gives error in NAS: Could not create an instance of the OLE control or Automation server identified by GUID={.....}:"NETConductor DataTier ...".CodeUnitServer. Check that the OLE control or Automation server is correctly installed and registered.
- 6.0 Regarding Returning data from CodeUnits
- 7.0 Regarding Windows IIS Security
1.0 Introduction
Please read these frequently asked questions before submitting a bug
2.0 Regarding Installation
The following frequently asked questions have to do with installing the NETConductor products.
3.0 Regarding Setup
The following frequently asked questions have to do with setting the NETConductor properly up.
3.1 All my .asmx pages show 'page not found'. What is wrong?
This is a problem that has most often happened in Windows 2003 but the following information might be of help to you even if your operating system is not Windows 2003.
Lets start with good news: you have obviously been able to install the NETConductor so the .NET Framework must be installed on you machine. So let us now we must ensure that you have the IIS and ASP.NET installed.
1) Look to ensure the IIS is installed:
You can do this by looking into the Add/Remove Windows Components Wizard. It can be found at:
Control Panel > Add or Remove Programs > Add/Remove Windows Components
It depends on your windows version where the IIS component is in the hierarchy of windows components. So look around and ensure it is checked. If you find it and it is properly installed you should be ok.
2) Still not working? Ensure ASP.NET is allowed.
In Windows 2003 Server (and maybe other versions as well) the ASP.NET is not allowed by default. In this case you have to allow the ASP.NET Web Service Extension. You can do that at:
Right-Click My Computer > Manage > Services and Applications > Open Internet Information Services (IIS) Manager > Select Web Service Extensions.
Now a list of Web Service Extensions should be shown on the right-hand side. If this list contains the ASP.NET v2.0.50727 then select it and click the 'Allow' button. But if the ASP.NET v2.0.50727 is not shown in the list then right click the Web Service Extensions, in the left hand tree, and run 'Allow all Web service extensions for a specific application...'. Then select ASP.NET v2.0.50727 under 'Application' and click the OK button. If the ASP.NET v2.0.50727 is not shown under 'Application:' then the .NET Framework 2.0.50727 is not properly installed (and then: how could you get this far?). Now the ASP.NET v.2.0.50727 should be shown in the right hand side list and you can select it and click the 'Allow' button. Once you have allowed ASP.NET v.2.0.50727 then you can access any .asmx page from your IIS and browser !!!
3) Still not working? Weird.
Try re-registering the .NET Framework with IIS. Run the following command:
SystemRoot\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
If the file is still not found then your .NET framework is not properly installed (and then: how could you install the NETConductor?). But if the aspnet_regiis runs then it shows:
Start installing ASP.NET (2.0.50727.0). Finished installing ASP.NET (2.0.50727.0).
And you should be able to access all your .asmx files using your IIS and a browser. Still not able to? Restart the machine. You are now able to access them? Still not (?!?)
3.2 My MiddleTier (MT) can't find a DataTier (DT) that is running.
One reason might be that you are running a Checkpoint VPN client. When Checkpoints VPN client is installed is changes the network interfaces of your machine in such a way that broadcasts, sent out by your machine, are not received by your machine. In this case you can either uninstall your Checkpoint VPN client or follow the description below, to create a static link from your MT to your DT. Another reason might be that you may be experiencing a problem with multicasted UDP packages from the DT not reaching the MT. This may be caused by routers not forwarding broadcast messages or other networking facilities prohibiting for security reasons. In this case, and others of similar nature, you may want to statically configure the MT so that it can find the DTs. You do this by changing the file 'service.config' that is, by default, located in a directory similar to C:\Program Files\Rue de Net\NETConductor\DT (or whereever you installed the DT). What you want to do is add nodes to the XML in this file, that is for each DT you want the MT to statically find you add something like: <add key="DT-ANYTHING" value="TEST.DT{127.0.0.1:8933}"/> where ANYTHING is any unique identifier, TEST.DT is the service-name of the DataTier you are statically providing, 127.0.0.1 is the IP address of where the DataTier is at, and finally 8933 is the port number of the DataTier. After changing this configuration file (be careful, the format of XML files is very fragile) you should list the DTs using the MT Configs Web Service to see if it shows up properly, if so you are ready to go.
3.3 My NAS is experiencing problems connecting. I keep getting a message saying that my server version is different?
The official explanation for the "Client and Server don't have the same version" problem, from www.navision.net is:
"Problem is that the Windows Login opens a Named Pipe connection to the server and in the present design the named pipe name isn't unique for the different Dynamics NAV Server versions."
"Unfortunately, there is no workarounds except of course to make sure that all databases are on the same version."
This is courtesy of Lars Lohndorf-Larsen of the Microsoft Support Team, our thanks to him. But don't get gloomy, you can minimize this problem by running the NETConductor in a NAS installation. The NAS will still experiance the same problem but it will automatically re-try to connect every 30 seconds and eventually it will get connected. The connection time then ranges from 0secs - 5mins. So this is more of an annoyance than a show-stopper.
3.4 Accessing my .asmx pages gives me '<%@ WebService Language="c#" Codebehind="..." Class="..." %>'. What is wrong?
See 3.1
3.5 "The country code in the license file does not correspond to the country code (GB) in the STX file."
The NET·Conductor is shipped with the GB stx file. If you are using a license file that does not allow that, then you will have to copy the appropriate CFrontXXX directory to another director and change the stx file. For example, if you have a spanish license, then copy:
C:\Program Files\Rue de Net\NETConductor\DT\CFront370
to
C:\Program Files\Rue de Net\NETConductor\DT\CFront370ES
and then copy your fin.stx and fin.etx into this new CFront37ES directory. When you have done this you will have to configure NET·Conductor to use this new directory. You do this by providing the extension you selected ("ES" in the example above) into the input field on the right of "FIN Base Path" input field, when running Form 84920 NETConductor. Then you can start the NET·Conductor and it will use your license file, fin.flf, and your local fin.stx when running NET·Conductor.
3.6 "Why is my DataTier not available?"
There can be different reasons for this, among those are:
1) The DataTier has not been started
- start it in a NAS or a Dynamics NAV client - try using 'netstat -an' and see if the correct port is being listened to.
2) The TCP/IP connection cannot be made from the MiddleTier to the DataTier
- try using 'telnet [IP] [PORT]' and see if the connection can be made.
3) A connection can be made but broadcasting cannot reach the DataTier
- in this case you need to create a static connection in the MiddleTier web.config file, using key 'DT-*', see comment in config file.
4) Finally, maybe you need to license additional connections
4.0 Regarding Licenses
The following frequently asked questions have to do with installing NETConductor licenses.
4.1 My Rue de Net license file (rdn.rlf) is in place and so is my Dynamics NAV license file (fin.flf), why is the NETConductor.GetLicense saying my license is not valid?
Un-check the 'Hide file extensions for known file types' under:
My Computer > Tools > Folder Options... > View > Files and Folders
Now Verify that the two license files are where you expect them to be and they contain the proper information.
5.0 Regarding Running the NETConductor
The following frequently asked questions have to do with running the NETConductor.
5.1 For no apparent reason, my NAS is crashing on me every now and then?
Step 1:
-------
Start by ensuring this isn't happening on all your NAS services. You can do this by starting a NAS service with the a StartupParameter of 'RUNEMPTY' and adding the following code to the NASHandler function in CodeUnit 1 Application Management.
//Debugging NAS - Start IF COPYSTR(Parameter,1,8)='RUNEMPTY' THEN BEGIN EXIT; END; //Debugging NAS - Stop
Your NAS will now starts properly but get no execution commands. If the NAS will not crash on you like this but will crash when you provide the StartupParameter 'NETC:NC00X' parameter then continue to step 2.
Step 2:
-------
Start by adding full log to the NETConductor DT, this means that you select the NETConductor configuration that you are using (NC00X in Form 84920 NETConductor) and check the Log check-mark there. Now you should start the NAS again with the 'NETC:NC00X' parameter and see the log file being created at C:\Program Files\Rue de Net\NETConductor\DT directory and being called something like NETCDT_CRONUS.DT_8933.log. Now you run the NAS until it crashes and then you look into the log files to see what was going on. If you are having problems with reading the log files Rue de Net would be happy to help you, just send them to ruedenet@ruedenet.com.
5.2 How would I restart the NAS automatically if it crashes?
First go through the steps outlined in 5.1 to ensure you haven't done some mistake in the configuration and/or send a query to ruedenet@ruedenet.com to ensure you have the latest version of the NETConductor. If you have done that and there simply seems to be some flaw in your operating system, machines, network that you can't find but you still need the NAS to keep on running. If you go into your Services list and select your NAS service. Right click and select Properties. Select the Recovery tab. On there you can select to Restart Service if it fails. But note that you have to select it in all three drop-down lists (unless you want to handle the error in other ways).
5.3 My NC is running really slow, it works but it is dead slow. What is going on?
There may be many reasons for slow requests through the DataTier. The performance is, at least, based on the following parameters:
- DataTier Machine CPU and Memory
- The Dynamics NAV Code running
- Number of records being returned
- The columns of those records
- Performance of calculated columns
The MiddleTier may become slow when accessing DataTier service "A" if that DataTier was first run on one machine but then moved to another. In this case the MiddleTier will remember that service "A" was run on the first machine and, even though it also knows of the same service on the second machine, it will try to reconnect to the first machine. You can simply solve this by running the "ClearDataTiers" operation in the "Configs" WebService that comes with the NET·Conductor MiddleTier.
5.4 My NC runs very well, but when it is left alone for 8-10 minutes, it breaks down. It gives an "Object does not match target type" exception.
This is because of a bug in an old version of the .NET Framework. Update your .NET Framework to 2.0 ASAP.
5.5 I get the "YOU MUST CONVERT THE DATABASE TO THE NEW VERSION..." error when I try to start the NET·Conductor DataTier
This is because you are using the C/Front version delivered with NET·Conductor to try to connect to a database that was created using an earlier version of Dynamics NAV. You should be using the C/Front libraries that come with the Dynamics NAV version that you used when creating the database. In order to do so you would, for example, copy: C:\Program Files\Rue de Net\NETConductor\DT\CFront370 to C:\Program Files\Rue de Net\NETConductor\DT\CFront370UPD and then copy the cfront.dll, dbm.dll, nc_netb.dll, nc_tcp.dll, nc_tcps.dll, ndbcs.dll into this new CFront37ES directory. You should also copy the cfrontsql.dll over the sql/cfront.dll file. You can now verify that all those file have the same, correct, version by right-clicking over them, selecting properties and then the Version tab. On the top you have the version number, which should be the same as your database version. When you have done this you will have to configure NET·Conductor to use this new directory. You do this by providing the extension you selected ("UPD" in the example above) into the input field on the right of "FIN Base Path" input field, when running Form 84920 NETConductor. Then you can start the NET·Conductor and it will use your new version of the C/Front library when running NET·Conductor.
5.6 The message "The definition of the field User ID was changed after the object was saved. Old type: Code, New type: Text" pops up randomly when using the NET·Conductor.
This happens when using Dynamics NAV with SQL server. The reason is that the fob file delivered with NET·Conductor was compiled using a native database. In native Dynamics NAV the User ID of the Session table (2000000009) is of type Code but in Dynamics NAV SQL it is of type Text. For this reason you have to compile all the NET·Conductor objects after you load them into your Dynamics NAV SQL database. Then this message will stop popping up.
5.7 Works fine with Client but gives error in NAS: Could not create an instance of the OLE control or Automation server identified by GUID={.....}:"NETConductor DataTier ...".CodeUnitServer. Check that the OLE control or Automation server is correctly installed and registered.
When you run the NETConductor DataTier in a Dynamics NAV Client you are using a different Windows user ID than when you run it in NAS. The problem is that when you installed the NETConductor DataTier you probably didn't check that you were installing it for Everyone. Please re-install the NETConductor DataTier and remember to check the Everyone radio button in the Wizard.
6.0 Regarding Returning data from CodeUnits
The following frequently asked questions have to do with how Dynamics NAV developers return data by developing Dynamics NAV CodeUnits.
6.1 A different set of records are available in Dynamics NAV than are returned through the NETConductor
The only reason for this (if you are absolutely sure this is what is happening) is if the NETConductor DataTier is interpreting the filtering of your records differently than Dynamics NAV.
The reason could lie in the fact that the NETConductor DataTier will interpret all filters as if the SETFILTER function was used (just like F7 on a form), even if the SETRANGE function is the one that was used. As an example, if you run a CodeUnit containing:
Sample 1:
----------
CustRec.RESET; CustRec.SETRANGE(CustRec."E-Mail",'the.cannon.group.plc@cronuscorp.net'); MESSAGE(FORMAT(CustRec.COUNT));
Then, a message box is opened up saying that 1 record fits the criteria of your filtering. However, if you add the code to return this record through the NETConductor, like this:
Sample 2:
----------
CustRec.RESET;
CustRec.SETRANGE(CustRec."E-Mail",'the.cannon.group.plc@cronuscorp.net');
MESSAGE(FORMAT(CustRec.COUNT));
Recs.GETTABLE(CustRec);
NETConductor.ReturnRecordset('Customer',Recs,Cols);
You get NO records returned. This is because the NETConductor DataTier does not distinguish between SETRANGE and SETFILTER. If you use SETFILTER instead of SETRANGE then the message box will say that 0 records fits the criteria and hence 0 records are returned. The problem is with the '@' sign, which has meaning in SETFILTER but not in SETRANGE. This means, that when working with NETConductor you could as well always use SETFILTER and then if you want to filter on a certain value you should use the following filter format:
Sample 3:
----------
CustRec.RESET;
CustRec.SETFILTER(CustRec."E-Mail",'=''the.cannon.group.plc@cronuscorp.net''');
MESSAGE(FORMAT(CustRec.COUNT));
Recs.GETTABLE(CustRec);
NETConductor.ReturnRecordset('Customer',Recs,Cols);
Now, this sample will show a message box with 1 in it and return the one record. Hopefully, the NETConductor will be able to distinguish between SETRANGE and SETFILTER soon - however - while the GetView function of RecordRef gives the same string whether SETRANGE or SETFILTER is being used, we have little chance.
7.0 Regarding Windows IIS Security
The following frequently asked questions have to do with how to setup Windows authenticaton and authorization so that the NETConductor uses the Roles and Permissions already setup in Dynamics NAV.
7.1 How do I setup Windows authentication and authorization to the NETConductor
1) The first thing you have to do is set the "Integrated Windows authentication" on the NETConductor virtual directory. You do this by first opening up your Computer Management (right-click on My Computer and select Manage from the popup-menu). Then you select as follows: Services and Applications > Integrated Information Services > Web Sites > Default Web Site > NETConductor Note that the directions above may vary a bit depending on your Windows operating system, IIS version and the name of the NETConductor Virtual directory you chose when installing the NETConductor (NETConductor is the default value). Now you right-click the NETConductor Virtual directory you selected above and select properties in that popup-menu. In the properties dialog you select the "Directory Security" tab and click the "Anonymous access and authentication control" Edit button. Now you are on the "Authentication Methods" dialog and you want to un-check the "Anonymous access" check-mark and ensure the checkmark at the bottom, "Integrated Windows authentication" is still checked. Then click OK and close all the dialogs again. You are done, your NETConductor MiddleTier is now protected using Windows authentication. However, any valid Windows user can now access the MiddleTier and then do whatever they want. I guess you want to restrict the access of those "valid" users within your Dynamics NAV Database. That is what point 2 below handles.
2) What you want to do now is have the NETCondcutor DataTier react to the authenticated user of the MiddleTier. This you do by opening up the Dynamics NAV Database, that the NETConductor DataTier will be running against, using a Dynamics NAV client. In there you open up the "Roles" window, by selecting from the menu:
Tools > Security > Roles
Create a role with the same name as your DateTier service name (for your purposes here we will use FAQ.DT). Once that role has been created, no users (valid Windows users or not) will be able to access your Dynamics NAV database, even if they can logon to the NETConductor MiddleTier the DataTier will now prohibit them from accessing the data of your Dynamics NAV Database. The only users that will be allowed to access the data are valid Windows users that have the newly created Role assigned to them. So lets do that. Start by entering the Windows Logins window, by selecting from the menus: Tools > Security > Windows Logins. In here you create a record (if it doesn't already exist) for the Windows user you want to allow access through the NETConductor into your database. Then you go into the roles window of that user (button at bottom of Windows Logins window, when the user is selected). In the Roles window you enter the roles of the user and by selecting those roles you are giving the user permissions into your database. All you have to do is add the DataTier (i.e FAQ.DT) role for this user to be able to use his other permission (note that there should be no permissions in the FAQ.DT role) through the NETConductor interface.
3) However, some users you may want to allow to go through the NETConductor interface but not allow them to logon using a conventional Dynamics NAV client. You can do this by creating a database login for the windows user, but never let the windows user know of his password. You would do this by going into the Database Logins window, by selecting from the menus: Tools > Security > Database Logins. In here you create a record for the Windows user by entering his full Windows user name (i.e. DOMAIN\USER) into the User ID field (note that the User ID field may not be able to hold the DOMAIN\USER and then you can put it into the User Name field). Then you enter the Roles window as before and assign the user roles/permissions and you have to assign the FAQ.DT role to the user.
