web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Dynamics SL 7 Object Model with .NET 4.0?

(0) ShareShare
ReportReport
Posted on by

I have a custom application that uses the Dynamics SL Object Model to automatic functionality.  We're using Dynamics SL 7 Feature Pack 1.

I'm trying to upgrade the application to be compiled against .NET 4.0, but I end up with an error when the application is running:

Unable to establish connection with MSDynamicsSL.SIVToolbarRemoteObject.  Active object not found.

Does anyone know if you are able to use the object model with .NET 4.0?

*This post is locked for comments

I have the same question (0)
  • Carolyn Kolpien Profile Picture
    on at

    Hello Ek0nomik,

    Typically this error appears when trying to login to SL using object model, but a previous session wasn't closed out or wasn't finished logging out.  Is this only happening on a terminal server session?

    I did some research and I found a few bugs (and hotfixes) that may help:

    Bug 19768 / KB 974709

    Bug 19286 / KB 977898

    Both bugs are fixed by the 19286 HF.  Both bugs deal with object model, and one of them was a problem running it on terminal server.  

    So I would apply the hotfix to see if that makes a difference.   Beyond that, try logging into SL manually using the same credentials your app is using to make sure you can login OK.  Then logout and try launching your app.  Let me know how it goes.

  • Community Member Profile Picture
    on at

    Hi Carolyn,

    Thanks for the reply, it's appreciated.

    I looked at the properties and version of the Microsoft.Dynamics.SL.ObjectModel.dll file mentioned in both of those knowledge articles you mentioned and our version is of a later version than those (7.3.31119.0), so I believe we have those hotfixes already.

    I can log in to SL manually just fine.  I'm doing my testing/development via Remote Desktop, but I cut that out of the equation and physically tested on the box (I know there are some articles that mention issues with Remote Desktop).

    I tried creating a very basic project (still compiled against .NET 4.0) and I put in only the following code:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.Dynamics.SL.ObjectModel;

    namespace TestDynamics {
        public partial class Form1 : Form {
            public Form1() {
                InitializeComponent();

                var foo = new SIVToolbar(); //Exception happens here!
            }
        }
    }

    I added only 1 line of code (the object model call) and it results in the exception from my original post (although, if I look at the Task Manager I do see that MSDynamicsSL.exe does start running from this line of code).

    I opened the project properties and changed it to compile against .NET 3.5 and the application works without any errors.  Do you know if anyone has gotten this working with .NET 4.0?

  • Carolyn Kolpien Profile Picture
    on at

    Hi Joe,

    We haven't really tested it on 4.0 and haven't had anybody say anything so far.  I was thinking that the hot-fix might help.  So we believe according to what you have done that .NET 4.0 isn't compatible with SL 7.0 object model.  Maybe someone else will chime in to offer their experiences.

  • Ajit Kannan Profile Picture
    1,246 on at

    Hello Ek0nomik,

    Framework ( 4.0 is not supported )

    Ajit Kannan

  • Steven Evans Profile Picture
    5 on at

    We've run into this issue as well, but the odd thing is that it works on my (the developer's) machine. We initially had this issue with SL7, but have upgraded to Dynamics 2011 and are encountering the same issue. The issue only occurs when we try deploying the automation application to a machine that has Dynamics & .NET 4 installed. Still haven't quite figured out why it fails.

  • mpdavison Profile Picture
    5 on at

    Is there a plan to support .Net framework 4.0 or higher?

  • Community Member Profile Picture
    on at

    Is there official word that the Object Model is not supported on Framework 4.0?

  • Community Member Profile Picture
    on at

    Did you ever get an answer or this issue resolved? We've been hit and miss with WPF applications accessing the object model...

    Thanks.

  • Community Member Profile Picture
    on at

    I never got it resolved; I couldn't upgrade our application to .NET 4.0.  If you have the luxury of picking out a different ERP I'd suggest looking for something that supports better integration.  Otherwise you'll be stuck in the world of COM.

  • Community Member Profile Picture
    on at

    Thanks. I've spent hours pulling my hair out over this... especially given that it works in some environments and not in others. I'm automating inventory issues and receipts. I'm probably going to write a .NET 2 server that remotely handles the transactions instead of trying to call from within my WPF application. Too much time already wasted.  

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans