Confusion over .Net interop

jbgrobler
Member Posts: 18
Hi,
I have a C/AL procedure that instantiates a .Net assembly object and pass it some values from the current record. The assembly variable is set to run on the client side. It all works during testing, but I noticed something that I do not understand:
During development and testing I had the assembly on both the server and RTC add in folders. Since it is only called on the client I removed it from the server, but now I get an error that NAV could not create a instance of the assembly class...
Is there some kind of marshaling to the server going on even though the .Net variable is set to run client side?
I have a C/AL procedure that instantiates a .Net assembly object and pass it some values from the current record. The assembly variable is set to run on the client side. It all works during testing, but I noticed something that I do not understand:
During development and testing I had the assembly on both the server and RTC add in folders. Since it is only called on the client I removed it from the server, but now I get an error that NAV could not create a instance of the assembly class...
Is there some kind of marshaling to the server going on even though the .Net variable is set to run client side?
0
Answers
-
I think it is because everything actually compiled on the server, and server just can't compile your object as assembly is not here. I had similar issue, and it has been solved after i've put assembly to server Addin folder.0
-
But the object is already saved as compiled using the development environment. Is the server doing another behind-the-scenes compile once a client session connects?0
-
I am not entirely sure how it works, but in my understanding when you compile an object it then create metadata (which is c# assembly), and then run it on server side. As assembly referencing to external dll (or .net assembly, or whatever else external) it fails on runtime (everything runs on server in my understanding) as assembly is not here. Again, it is just my view on this complex stuff. I believe MS guys know better - but not sure they are here to explain this to us
. Generally, i had some experience with external .net addins - they must be put to the server addin folder - it just does not works if they aren't here!
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
- 322 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