Error 1508 & 1505 in Event Log when using NAS

Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
Configuration:
- Navision 4.0 installed with SQL db
- NAS service installed on Windows 2003 server
- NAS service runs as user NAVCRMUser

Target:
- Sync Navision contacts with public folder in Outlook

Error:
- In Event Log on NAS server, following errors are displayed:
Event Type: Error
Event Source: Userenv
Event Category: None
Event ID: 1508
Date: 1/27/2006
Time: 3:58:00 PM
User: ABC\NAVCRMUser
Computer: BL-SLQ02
Description:
Windows was unable to load the registry. This is often caused by insufficient memory or insufficient security rights.

DETAIL - A required privilege is not held by the client. for C:\Documents and Settings\NAVCRMUser\Local Settings\Application Data\Microsoft\Windows\\UsrClass.dat
Event Type: Error
Event Source: Userenv
Event Category: None
Event ID: 1505
Date: 1/27/2006
Time: 3:58:00 PM
User: ABC\NAVCRMUser
Computer: BL-SLQ02
Description:
Windows cannot load the user's profile but has logged you on with the default profile for the system.

DETAIL - A required privilege is not held by the client.

When manually logged in as user NAVCRMUser on the NAS Server, Outlook can be started normally. And the sync code also works when this code is executed manually, on the NAS Server, with the same NAVCRMUser.

What can be the cause of this error?
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)

Comments

  • atarisataris Member Posts: 109
    in codeunit 1 have you setup the trigger and specified the parameter?
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Sure:
    [...]
      IF CGNASStartedinLoop = FALSE THEN
        CASE Parameter OF
    
    //*** 001 BEGIN
          'BATCH':
            CODEUNIT.RUN(CODEUNIT::"Batch Execution Controller");
    //*** 001 END
    
          'MAILLOG':
            CODEUNIT.RUN(CODEUNIT::"E-Mail Dispatcher");
    [...]
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • DenSterDenSter Member Posts: 8,307
    Make sure that your user is allowed to run as a service. Usually this is set automatically when you assign a user to the service, but sometimes you need to set this manually. I don't remember exactly where it is, but it should be under computer management somewhere.

    Is you user a domain user or a local user on the NAS box? Usually opening Outlook under the user creates the right profile on the machine and from then on you should be able to run the email dispatcher.

    Did you try restarting the service? Restarting the machine?
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The NAS is working fine with that user. When I put a message in the (new) codeunit "Batch Execution Controller", it is displayed in the Event Log.

    It's a domain user. Outlook opens fine when we log in with that user on the NAS Server (using Remote Desktop). So the Outlook profile has been created.

    Service has been restarted.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • DenSterDenSter Member Posts: 8,307
    So you have two NAS instances running. Which one causes what error?

    I assume that your Navision license has enough NAS instances. This feels to me like the user doesn't have enough permissions on some folder that the service is trying to access.

    What does the batch execution controller do? Maybe it's due to the things you're trying to automate that it doesn't know how to do that as a service.
  • kinekine Member Posts: 12,562
    1) The main error is:
    Windows cannot load the user's profile but has logged you on with the default profile for the system.

    DETAIL - A required privilege is not held by the client.
    It need to be solved.

    2) On domain controler you can select which accounts can run as services. Check this
    3) Try to add this user account into Administrators group on the local machine of the NAS server
    4) Sometime I had this error (creating temp profile etc.) on my notebook. I found that the notebook was added into domain but the Computer account in AD did not exist.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    DenSter wrote:
    So you have two NAS instances running. Which one causes what error?

    I assume that your Navision license has enough NAS instances. This feels to me like the user doesn't have enough permissions on some folder that the service is trying to access.

    What does the batch execution controller do? Maybe it's due to the things you're trying to automate that it doesn't know how to do that as a service.

    There is one NAS instance running with the parameters 'MAILLOG, BATCH'.

    MAILLOG: is the standard Navision parameter to store mails inside CRM.
    BATCH: is a new parameter to sync contacts to a public folder. This is basically the same as the function StartOutlookSyncronization from Codeunit 1, which is executed when a Salesperson has a checkmark on the field "Enable Syncronization". All output is disabled in the "Synchronize with Outlook" report.

    Next time I'm at the client's location, I'll do the trick with a form containing a button with the code:
    cduCodeunit1.NASHandler('MAILLOG,BATCH');

    When run as a normal user, I can see if it runs fine, and can use the debugger in case it doesn't. And I can try to run it only with the 'BATCH' parameter, as both are using "NS Outlook Synchronization Handler" automation.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • kinekine Member Posts: 12,562
    do not forget, that you can still run the NAS directly with debugger turned on with parameter "debug=1" and "breakpoints
    =1"
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.