Open Forum

Expand all | Collapse all

.NET error on one server, but not another

Jump to Best Answer
  • 1.  .NET error on one server, but not another

    Posted 10 days ago

    We just had some custom development done and recently moved it from Test into Production.
    We're getting the error below on three of our User Application Servers, but not on one of them.

    Error message when trying to get a Kuebix Freight Quote in NAV 2016. Works on one UAS, but not the other three.


    The odd thing, is we copied the same dll files to the NAV 2016 Server Add-in folder (C:\Program Files\Microsoft Dynamics NAV\90\Service\Add-ins) on all of the servers and confirmed they're exactly the same as the ones in our Test environment.
    We thought that we might need these added to the NAV 2016 Client Add-in folder as well (C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\Add-ins), but that didn't help either.

    Does anyone have any thoughts as to what we could be missing?



    ------------------------------
    David Stephenson
    IT Manager
    Mity Inc.
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: .NET error on one server, but not another

    Posted 8 days ago
    Have you tried re-selecting the variable sub-type? Sometimes that's all it takes.

    ------------------------------
    Norman Cruz
    CEO
    CNCOVE INC
    CA CA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: .NET error on one server, but not another

    TOP CONTRIBUTOR
    Posted 8 days ago
    Have you verified that the service account (the account the NAV Service Tier is running under) has read permission to that specific add-on directory C:\Program Files\Microsoft Dynamics NAV\90\Service\Add-ins ? That would need to be done on each service tier server.

    ------------------------------
    Kyle Hardin
    Business Central Developer
    ArcherPoint Inc.
    Atlanta GA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: .NET error on one server, but not another

    Posted 7 days ago
    Thanks for the suggestions @Kyle Hardin and @Norman Cruz.
    We checked both things and are still getting the error​​.
    The developer sent over their Visual Studio solution so we can try to recompile the .NET add-on to see if something went wrong when it was sent to us.
    I'll post an update here once our internal developers have a chance to take a look at it.

    ------------------------------
    David Stephenson
    IT Manager
    Mity Inc.
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: .NET error on one server, but not another

    TOP CONTRIBUTOR
    Posted 7 days ago
    Right after you restart the service tier (the one that has the problem), check the Application Event Log. There may be more information or a better error message.

    ------------------------------
    Kyle Hardin
    Business Central Developer
    ArcherPoint Inc.
    Atlanta GA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: .NET error on one server, but not another

    Posted 7 days ago
    David,

    One very important thing i forgot to mention is, make sure you register the .dll.

    you can use the regsvr32.exe at the command prompt. Make sure to run command prompt as administrator.

    Thanks

    Norman

    ------------------------------
    Norman Cruz
    Owner/Dynamics NAV Consultant
    CNCOVE INC
    WEST HILLS CA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 7.  RE: .NET error on one server, but not another

    Posted 6 days ago
    My apologies. Disregard the last reply from me about registering the .dll. i just realized it's a dotnet not automation server.

    automation server, then the COM .dll needs to be registered.

    i had the same issue with dotnet. i did copy it to the add-in nav server folder, then had an issue compiling the object, so i went to the object variable and removed the sub-type, then drill downed into the list of of dotnet objects and reselected it there and had it working.

    Thanks

    Goodluck David!

    ------------------------------
    Norman Cruz
    Owner/Dynamics NAV Consultant
    CNCOVE INC
    WEST HILLS CA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 8.  RE: .NET error on one server, but not another

    GOLD CONTRIBUTOR
    Posted 6 days ago
    Hi David,

    I'd see if the event viewer has anymore information.  It may have more details.

    Just a guess - but I would say the .DLL files you copied have a prerequisite that is installed on 2 of the 3 servers and that is the problem. The DLL is present, but it can't run because it needs some other DLL that it uses.  This can be tricky to track down without the original source code. If there was an installer created for the .DLL files, make sure you run that - not just copy the files around.

    Before .NET we had something called depends.exe that would tell us the dependencies of a program. According to this link: How do I determine the dependencies of a .NET application?https://stackoverflow.com/questions/227886/how-do-i-determine-the-dependencies-of-a-net-application one author recommends .NET Reflector and/or ILSpy but I have no experience with either so I can't tell you if it will work and is safe.  Do a little digging to make sure these are considered good products for this purpose.

    -Rob

    ------------------------------
    Robert Jolliffe B.A.Sc, MCSE, MCS - NAV Manufacturing Expert
    President
    Sabre Limited
    Cambridge
    robert@sabrelimited.com
    www.sabrelimited.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 9.  RE: .NET error on one server, but not another

    Posted 6 days ago
    if the files are .dll, then they have to be registered, or they will not be recognized in NAV.

    ------------------------------
    Norman Cruz
    Owner/Dynamics NAV Consultant
    CNCOVE INC
    WEST HILLS CA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 10.  RE: .NET error on one server, but not another

    Posted 6 days ago
    Edited by David Stephenson 6 days ago
    Thanks @Norman Cruz, @Kyle Hardin, and @Robert Jolliffe for all of your great suggestions.
    We checked the two servers this is working on and it didn't have the dll registered on either of them.
    When we checked the event log, ​​we found a different file referenced System.Net.Http.

    When we compared the files between the servers, the two that it was working on are version 4.7.3062.0 and the non-working ones are 4.7.2661.0.
    But, the installed versions of .NET are the same between all of the servers.

    Does anyone know how to update the .NET framework dll's?
    This is referenced in the assembly at this file path C:\Windows\Microsoft.NET\Framework64\v4.0.30319



    ------------------------------
    David Stephenson
    IT Manager
    Mity Inc.
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 11.  RE: .NET error on one server, but not another

    Posted 6 days ago
    Take a look at the link below on Regasm.exe. I've done this a while ago don't remember exactly off the top of my head.

    https://docs.microsoft.com/en-us/dotnet/framework/tools/regasm-exe-assembly-registration-tool

    Regasm.exe (Assembly Registration Tool)
    Microsoft remove preview
    Regasm.exe (Assembly Registration Tool)
    The Assembly Registration tool reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. Once a class is registered, any COM client can use it as though the class were a COM class.
    View this on Microsoft >





    ------------------------------
    Norman Cruz
    Owner/Dynamics NAV Consultant
    CNCOVE INC
    WEST HILLS CA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 12.  RE: .NET error on one server, but not another

    GOLD CONTRIBUTOR
    Posted 5 days ago
    Googled System.NET.http and found this

    https://stackoverflow.com/questions/47570912/strange-issue-with-system-net-http-4-2-0-0-not-found

    Which seems to indicate Visual Studio might be missing.  Since a lot of NAV customers install Visual Studio to edit RDLC reports, maybe 2 of the servers have it installed and one does not?

    That might explain. If the Report Builder/Visual Studio is not installed on the 3rd server that might fix the issue.  If there is a version on your NAV DVD I'd go with that first (or if there is an installed software folder on your server(s) that list it try that also).

    -Rob

    ------------------------------
    Robert Jolliffe B.A.Sc, MCSE, MCS - NAV Manufacturing Expert
    President
    Sabre Limited
    Cambridge
    robert@sabrelimited.com
    www.sabrelimited.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 13.  RE: .NET error on one server, but not another
    Best Answer

    Posted 5 days ago
    It looks like @Robert Jolliffe sent us down the right path.
    It had ​​something to do with Visual Studio and .NET.
    We installed Microsoft Visual Studio Tools for Applications 2017 and started installing the .NET SDKs for Visual Studio until it (finally) started working.

    Thanks @Norman Cruz, @Kyle Hardin, @Robert Jolliffe for all of your great help and suggestions!
    It definitely minimized the time it would've taken for us to resolve this without it.

    ​​​

    ------------------------------
    David Stephenson
    IT Manager
    Mity Inc.
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 14.  RE: .NET error on one server, but not another

    Posted 5 days ago
    David,

    Great to hear you got it working.

    Good job Robert!


    ------------------------------
    Norman Cruz
    Owner/Dynamics NAV Consultant
    CNCOVE INC
    WEST HILLS CA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 15.  RE: .NET error on one server, but not another

    GOLD CONTRIBUTOR
    Posted 5 days ago
    Glad I could be of assistance.

    Every now and again those old programming muscles get used.  Good to know I've not forgotten all of it! ;)

    ------------------------------
    Robert Jolliffe B.A.Sc, MCSE, MCS - NAV Manufacturing Expert
    President
    Sabre Limited
    Cambridge
    robert@sabrelimited.com
    www.sabrelimited.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role