Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to deploy .net control add-in into Nav RTC

Posted on by 5,124

Hello, I created a .net control add-in (dll) and have implemented it in one of my Nav pages by adding it in the C/AL local variable.  I made sure to set RunOnClient=True.  In my Dev pc whereby I have the Nav Server and RTC installed, it worked!  In the test server whereby both Server and RTC are installed, it also worked.  But in the machine whereby only the RTC is installed, I get an error that the .net cannot be loaded.

Am I missing something?  I copied the dll into the addins folder of the machine's RTC folder.  I added an entry in the 'Client Add-in' table to add the dll name, its public token key and the description.  I don't know what else I have to do.  I am guessing it worked in my dev pc and the test server pc because of the Nav server.  Something is not allowing me to run in the Client RTC only install.

Please help!

*This post is locked for comments

  • Verified answer
    mbr Profile Picture
    mbr 5,124 on at
    RE: How to deploy .net control add-in into Nav RTC

    Oh my! I feel like a dunce!!!! I forgot to copy the dll file into the RTC add-in folder! I thought I did but it actually gave me an error since I didn't have admin rights...but I didn't notice. Lol! So when I asked our network guy to copy into add-in folder of the RTC, it worked.  Yes, I have set the runonclientonly=true.  It's also a normal addin.  I have learnt something new though...difference between control add-in and normal add-in.  SO I have deleted the entry in the Client add-in folder as it serves no purpose.  Thanks Jonathan.  My problem is resolved! It's working now.

  • TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: How to deploy .net control add-in into Nav RTC

    As he mention it is working fine in the server and not working in the client.

  • keoma Profile Picture
    keoma 32,675 on at
    RE: How to deploy .net control add-in into Nav RTC

    is it a server side or client side funtionality?

  • Suggested answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: How to deploy .net control add-in into Nav RTC

    Did you set the variable property of "RunOnCLient" to False.

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: How to deploy .net control add-in into Nav RTC

    hi mbr,

    normally the error message "cannot create an instance of the following .Net Framework object: assembly xy ..." means that there is a problem with the .net assembly. it can also be a permission issue, but better check the assembly c# code.

    as i wrote above: check, if the assembly (the file) is per system (windows) blocked --> file properties.

    either the dll is not found by nav or it is not accepted. best you install also the development environment on the client pc, where you only installed the rtc client and check, if the assembly is reachable there and the page/report/cu is compilable.

    another thing is to develope a very, very simple assembly and test the whole thing with that to exclude some of the error reasons.

  • mbr Profile Picture
    mbr 5,124 on at
    RE: How to deploy .net control add-in into Nav RTC

    Hi Jonathan.  Oh Sorry. It's a normal add-in then.  It's just a local variable with dotnet as datatype.  I guess I should remove entry in the client add-in table as it serves no purpose as per your message.

    Anyway, the purpose of the addin is to call a .net dll while passing variables.  So in Nav, we will instantiate the assembly and call a method. This method is a c# form with webform control.  Here I set the url with the variables as querystring then display.

    So after calling this .net assembly, nav doesn't expect anything back from it.  Like I said, it worked fine when a nav server is present in the workstation as well.  But if it's only the nav rtc, I get the 'cannot create an instance of the following .Net Framework object: assem..'.  Note that I did drop the dll file in the RTC's addin folder.  IT's a .net framework 4.0 dll.  Thoughts?

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: How to deploy .net control add-in into Nav RTC

    is it a visual control (visible on a page), did you set the control-addin as value in the property control-addin to a field? if not, then it's not a control-addin, but a "normal" addin (you use it as variable. control-addins are not used as variable). addins, without visual part, need no entry in the client-addin table.

    what is the error message?

    what is the purpose of the addin?

    do you access a file/folder?

    how did you copy the assembly to the client pc? over the web? is the client pc  OS a windows server system? check the file properties, maybe the file is blocked.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans