NAV 2016 / Chilkat FTP - dotNet Instantiation

thomas.kraft@gmail.com
Member Posts: 7
Hoping someone have messed about with this ftp-library that I've been using quite a few times in the past but never with NAV 201x.
I've copied the ChillkatDotNet45.dll into both Add-ins folders (server/client) and after a service restart the DLL lists on the Dynamics NAV tab of the Assembly List from where I'm assigning the SubType to my FTP variable. So far so good.
01> CLEAR(FTP);
02> FTP.UnlockComponent('...my_key...');
On my first attempt to invoke a method call (line 02), I get this error :
"A DotNet variable has not been instantiated. Attempting to call Chilkat.Ftp2.UnlockComponent in CodeUnit ...."
So i did some searching and found this article explaining that I need to use a constructor to instantiate the assembly before i can start using its methods. Allright then.
The assembly offers me two selections under the 'Constructors' section in the C/AL Symbol Menu. Both named 'Ftp2'.
01> CLEAR(FTP);
02> FTP := FTP.Ftp2();
03> FTP.UnlockComponent('...my_key...');
This time the Constructor assignment fails (line 02) with :
"Cannot load an instance of the following .NET Framework object: assembly.ChilkatDotNet45, Version=9.5.0.62, Culture=neutral, PlublicKeyToken=eb5fc1fc52ef09bd."
I have no clue if this is the result of a deficient assembly or a lack of understanding on my part.
Any assistance is welcome.
I've copied the ChillkatDotNet45.dll into both Add-ins folders (server/client) and after a service restart the DLL lists on the Dynamics NAV tab of the Assembly List from where I'm assigning the SubType to my FTP variable. So far so good.
01> CLEAR(FTP);
02> FTP.UnlockComponent('...my_key...');
On my first attempt to invoke a method call (line 02), I get this error :
"A DotNet variable has not been instantiated. Attempting to call Chilkat.Ftp2.UnlockComponent in CodeUnit ...."
So i did some searching and found this article explaining that I need to use a constructor to instantiate the assembly before i can start using its methods. Allright then.
The assembly offers me two selections under the 'Constructors' section in the C/AL Symbol Menu. Both named 'Ftp2'.
01> CLEAR(FTP);
02> FTP := FTP.Ftp2();
03> FTP.UnlockComponent('...my_key...');
This time the Constructor assignment fails (line 02) with :
"Cannot load an instance of the following .NET Framework object: assembly.ChilkatDotNet45, Version=9.5.0.62, Culture=neutral, PlublicKeyToken=eb5fc1fc52ef09bd."
I have no clue if this is the result of a deficient assembly or a lack of understanding on my part.
Any assistance is welcome.
regards/tkr
0
Comments
-
Can you double check that the DLL exists in the Add-ins folder for the service? Also, do you have more than 1 service for the database and if so then have you installed in the Add-ins folder for each service?0
-
Hello Kishorm,
There's only one service-instance pointing to the database.
Client has :
C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\Add-ins\ChilkatDotNet45.dll
Server has :
C:\Program Files\Microsoft Dynamics NAV\90\Service\Add-ins\ChilkatDotNet45.dllregards/tkr0 -
I had this once because when i copied the dll into the addin-directories the file was marked as unsafe. Select properties on the dll-file and check/remove this.0
-
I had this once because when i copied the dll into the addin-directories the file was marked as unsafe. Select properties on the dll-file and check/remove this.
Sorry but check/remove .. what? I'm guessing you're not talking about the 'read-only' and 'Hidden' attributes or even the four additional attributes on the advanced page regarding archiving and compression?regards/tkr0 -
-
No. This checkbox is not available to me, neither on the client, nor on the server.
I would be curious to see if anyone else (could be bothered) trying this out got the same issue.
The assembly can be downloaded from this page.
regards/tkr0 -
You're getting the error because you are copying the 32 bit DLL into the Add-ins under the Service folder. Remember the NST is 64 bit - copy the 64 bit DLL there instead.1
-
-
Great! Please can you select "Yes" on the "Did this answer your question YES/NO?" on my post above so that others can easily find the correct answer to this post.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions