The environment is NAV & NAS 5.0 SP1 installed on Server 2003. Server is also running SQL 2005, and NAV db is on that server.
NAS is functioning perfectly, to a point. When NAS boots, code in the DB/company initialises a timer properly, and the correct code fires regularly as desired.
When the NAS timer fires, its job is to read a setup record and get file paths to import from and to log activity to. It then searches the import folder and processes whatever files are there.
I also have a 'test' button on the setup form, that executes exactly the same code as the timer would.
The import folder is set to S:\, which is mapped to \\102.168.100.32\export.
Here is the problem: When NAS runs, this error appears in the event viewer:
The operating system cannot find the drive and directory specified for the file S:\*.* .
But, when I log onto the box as the same Windows user as NAS uses, run the NAV client with (obviously) the same Windows credentials, and click the test button, it finds that path and processes files properly. :-k
I tried setting the import path to \\102.168.100.32\export and the error in the event viewer changed to
Logon failure: unknown user name or bad password.
:-k :-k
Oh, logged onthe the box as the NAS user I can 'DIR' both paths successfully from a command prompt.
I don't think this is a problem with the code that runs (I've got loggin up the ying-yang that tell me EXACTLY the same code runs and searhces the same path.) This has to be some weird Windows credentials error - but I'm not an export in that realm.
Any ideas out there?
Thanks in advance.
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Second: check the permissions of the NAS user in the windows system and the permissions behind the shared folder (\export)
3-rd: copy a client on the NAS machine and run this client with the NAS user id and start there the codeunit with the timer to see if there comes the error message.
Regards
I did (see original post.) When I used \\102.168.100.32\export I got a different error "Logon failure: unknown user name or bad password.".
The NAS service is configured to use the login 'NAS', and I remote desktop to the box using the same login and then run the NAV client as that user. I'm not trying to be difficult, but I don't see how the two login differ with respect to that shared folder. I don't have access to the 100.32 machine to check permissions, but if I do get it, what should I look for?
As stated earlier, there is a NAV client on the machine, and I do open the db using that client, as the same user as NAS.
As far as starting the codeunit with the timer, I don't quite see how. The call from the timer codeunit to the 'import' codeunit is in the function NavisionTimer::Timer(Milliseconds : Integer). It contains one line - the call to the import codeunit. I tried creating another codeunit to execute NavisionTimer, but NavisionTimer ss not 'visible' outside the codeunit.
:-k
make sure you are not missing a back slash.
c:\export\ instead of c:\export
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Missing backslash? My logging displays all the activity including the path being searched:
I think the extra backslash on the 'Processing file' line is a mistake in the logging code, but it's irrelevant, the file has been found and is imported.
The main point of the above is that NAS fires the code once an hour, and has been doing that for a month with no hiccoughs. The file manually imported had a date/time of 11:40 PM the previous night, so it had been sitting there for 10 hours or so (and 10 invocations of the NAS import code) without being 'seen'. It was only detected when the NAV client was booted and the import started manually.
(Still) :-k
There are many threads on this.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I think you misunderstood me.
I have two codeunits:
#1 - The one containing the timer finction
#2 - The import codeunit
If I create a 3rd codeunit and, in it, create a Codeunit variable for #1, the NavisionTimer functions is NOT displayed in the Symbol Menu. So, I can't call the timer function from another codeunit as suggested. So, I can't test this as suggested earlier by calling the timer function.
Also, I do force a refresh of the virtual file table before 'aiming' it at the import folder.
Aren't you enabling the time components?
So by just running CU 1 it will start the timer. You can turn on debugger to see the timer event triggering.
Also it is single instance codeunit?
I don't understand why you can't run your first CU from object designer.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Bob
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
But, I think this all boils down to flakey drive mappings & permissions.
Bob