Job Queue Entry not working after applying hotfix (Microsoft.Navision.Mail.dll)

We are using NAV 5 SP1 with a technical upgrade to NAV2009R2.
We have a codeunit which is generating a report and sending this as attachment through SMTP to some users. This codeunit is called though a NAS.
Until yesterday this worked great.
Today we have applied a hotfix which replaced Microsoft.Navision.Mail.dll so we can use a port no.
The Job Queue Entry is not working anymore and produces the following error:

This message is for C/AL programmers:
Could not invoke the member AddBCC. The OLE control or Automation server returned the following message:
The number of elements provided is different from the number of arguments accepted by the method or property.

I have replaced Microsoft.Navision.Mail.dll on the terminal server, the NAS-server and the SQL-server.
The old dll is unregistered with RegAsm.exe /u Microsoft.Navision.Mail.dll
The new dll is registered with RegAsm.exe /codebase /tlb:Microsoft.Navision.Mail.tlb Microsoft.Navision.Mail.dll

When calling the codeunit manually the attachment is created en the mail is send through SMTP.
When calling the codeunit through the NAS the error above occures.

Does somebody have a solution?

Thanks in advance.

Best Answer

Answers

  • postsauravpostsaurav Member Posts: 708
    It Seems that you are manually running the codeunit on the client but NAS works on server. Try running codeunit on the server.

    Did you register the new DLL in server?

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • elwin68elwin68 Member Posts: 153
    edited 2016-01-21
    Thanks for your answer.

    The codeunit is working fine when running manually on the client but also when running manually on the server.
    I also have logged in as nas user and runned the codeunit fine.

    I seems the NAS is working with the old dll but i have registered the new dll on the server too.
    When I start NAV on the server and look at the automation server overview the new version (7.3) of 'Microsoft Navision Mail' is shown.
Sign In or Register to comment.