Jun 252010

If you are using the DYMO SDK from a .NET application you might run into a problem where the application throws an exception when trying to instantiate DymoAddin or DymoLabels objects. The error message is like this:

System.Runtime.InteropServices.COMException (0x80040154). Retrieving the COM class factory for component xxxx failed due to the following error: 80040154

To fix this try the following:

  • make sure you have the latest DYMO Label v.8 installed. The latest version is always available from the download section on dymo.com. currently the latest version is
  • if you are running on 64-bit Windows make sure you compile your application as 32-bit (switch TargetPlatform from default AnyCpu to x86). See this and this. If you can’t change the TargetPlatform, try the beta SDK that adds 64-bit support
  • reimport interop references to SDK libraries. Remove Interop.Dymo.dll from the project settings; add reference to “DLS7 Compatibility COM Type Library 1.0″ COM library; recompile your application.

  65 Responses to “Error 80040154 retreiving COM Class factory”

  1. Hi
    I get the following error when I run my asp.net application on the ISS server ( No locally in VS2005)

    Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80070005.

    Normally I have to grant rigths to access the Componets services (DCOM config), by I can not find any object with the id 09DAFAE2-8EB0-11D2-8E5D-00A02415E90F there.

    Any yes I the newest version installed, and downloaded the dll fix, and they are all on the IIS server.

    Mange greetings


  2. Hi

    Yes I know, but you need to set at access settings on the DOCM object 09DAFAE2-8EB0-11D2-8E5D-00A02415E90F, for the IUSR_XXXXXX, but I can not find this anywhere, so the IIS user can access and use the DYMO interop.

    And yes we are using + BETA version of the SDK, we are testing to change from Zebra to DYMO, so any quick soluiton would be great.

    Thanks for your help so far.

    • What is the Windows version the IIS is running on? Is it 64-bit? If yes, then you have to install DLS (beta), because 64-bit support has been added only in this version. Another option is to configure IIS to host 32-bit processes. If Windows is 32-bit, then it is more likely installation issue. Could you try to uninstall DYMO Label and SDK and then install them again? If the error persist, could you send the installation log file? From Program FilesDYMODYMO LabelSupport run LWSupport utility and follow on screen steps to create the log file.


  3. Hi

    We are running 32 bit, IIS7, to where should I send the DLS8Support.zip



  4. Hi,

    I am having the same issue, were you able to resolve it?

  5. HI

    No never got it to work, somehow I can not set the IUSER_XXXX/ASP_NET to have access rigths to run the Dymo interop application. :-(

    I did this work around instead ( DYMO Client must be installed on the users PC )

    What I do is to read a predefined XML .label file replace the my pre defined text with my new text and send the new label to the client.

    Dim sr As StreamReader = File.OpenText(Server.MapPath(“~/itinventory/labels/”) + “pcstandard.label”)
    Dim txtline As String = sr.ReadToEnd

    Dim filename As String = Server.MapPath(labelstemp) + Me.PeDbCompanyEquipmentTag.Text + “.label”
    If File.Exists(filename) Then
    Catch ex As Exception
    SendEmailFunction(“debugowisdss20@xxxxx.com”, “it@xxxxx.com”, “”, “Error on owis.dss 20″, ex.Message, True)
    End Try
    End If

    txtline = Replace(txtline, “PEDBCOMPANYEQUIPMENTTAG-DATA”, ValidForCode39(Me.PeDbCompanyEquipmentTag.Text))
    If Me.PeDbWarratytyEnd.SelectedDate > DateSerial(1980, 1, 1) Then
    txtline = Replace(txtline, “PeDbWarratytyEnddata”, Me.PeDbWarratytyEnd.SelectedDate.ToShortDateString)
    txtline = Replace(txtline, “PeDbWarratytyEnddata”, “”)
    End If

    Dim sw As StreamWriter = File.CreateText(filename)

    Response.ContentType = “text/plain”
    Response.AddHeader(“Content-Disposition”, “attachment; filename=” + filename)

    • if you want to run it on the server side, you have to have IIS user an access to the printers as well. The easiest way to do that is to use impersonation. From our FAQ:

      Q. I get access or privilege related errors when I run the ASP.NET sample. What can cause this?
      The ASP.NET sample script is executing on the server side. You may have to set up the ASP page to execute under a specific user account that has access to the printers you wish to use.
      To specify a user account for the ASP page, add this element into the web.config file:

      <identity impersonate="true" userName="domainusername" password="password"/>

      See http://msdn.microsoft.com/en-us/library/aa292118%28VS.71%29.aspx for more information

  6. Year, but this is not good enough, you don’t want to have a page where it is run as administrator on the web :-(

    The way to do it correctly exp. for the Office interop if to set the access rigths for the interop. Arg arg

  7. Hi All,

    I am having the same problem trying to create the DymoAddIn class from a Windows Service. I followed the instructions provided above for my 64bit dev box and got it to work last night. Today, the problem occurs again and following the steps did not fixed the problem. Any other suggestions will be greatly appreciated. I am starting to think that some security policy is blocking the creation of the DCOM class.


  8. Creating an instance of the COM component with CLSID
    {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed
    due to the following error: 80040154.

  9. Creating an instance of the COM component with CLSID
    {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed
    due to the following error: 80040154.
    vs 2008windows application…
    X86 build application…

    in registry the CLSIDcorrespondes to
    C:Program FilesDYMODYMO Label SoftwareDLS8BackwardCompatibilityCOMLib.dll that is installed by the latest version of Dymo…

    • After installing the latest DLS 8 (which also installs the SDK libraries), open your SDK project, be sure to re-import all Interop references to SDK libraries. Remove Interop.Dymo.dll from the project settings and add a reference to ‘DLS7 Compatibility COM Type Library 1.0’ (a bit confusing that the name in the Add Reference dialog differs from DLS8BackwardCompatibilityCOMLib.dll) and then re-compile your application. Click on the links in this post for greater detail.

  10. hi am getting the followin error in my windows application

    Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80040154.

    it is build in x86 mode and com reference is added. this error generates at runtime..

    any one Help me plz…

  11. it happen on the development machine. its not a web application its a windows based application. os is Xp. i have DYMO Label v.8 installed and also The ClSID is in registery and that points to the file DLS8BackwardCompatibilityCOMLib.dll.

    Thanks Valdimir….

  12. it happen on the development machine. its not a web application its a windows based application. os is Xp. i have DYMO Label v.8 installed and also The ClSID is in registery and that points to the file DLS8BackwardCompatibilityCOMLib.dll.

    Thanks Valdimir

  13. Hi

    I hade the same problem because I had put the source code on a share that where not trusted from VS.

    I copied the source file to “C:UsersccrDocumentsVisual Studio 2005ProjectsDymobeta” and compiled from there, then it worked.



  14. I am having a terrible time trying to get this to work. I have installed the latest label software and also the beta SDK. I have removed all references to any Dymo dlls and simply referenced the DLS7 Compatibility COM Type Library 1.0″ COM library (which appears confusingly as Interop.Dymo.dll. I then built my solution and ran it.

    I got the following: “Retrieving the COM class factory for component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} failed due to the following error: 80040154″. I am using Windows 7 64 bit with IIS 7. I cannot change the target cpu of my project. It has taken me 4 days now and I am still nowhere near fixing this error.

    • Just a follow up on this: I’ve now given up trying to get this to work properly as I’m running out of development time and the combination of altering IIS settings, using different beta versions of SDKs and Label Software, Application Impersonation, Running IIS App pools in 32 bit etc is now getting a bit of a headache!

      In the meantime I have used VMWare to create a 32 bit machine running SBS which has a service sitting on it listening for requests via a DB to print to the Dymo. This may be a temporary workaround for some of you while we wait for a decent development kit for 64 bit machines.

    • Open your SDK project, be sure to re-import all Interop references to SDK libraries. Remove Interop.Dymo.dll from the project settings and add a reference to ‘DLS7 Compatibility COM Type Library 1.0’ (the label for ‘DLS8BackwardCompatibilityCOMLib.dll’)and then re-compile your application.

      Note: If running on 64-bit Windows, and using a version of DLS 8 which is less than v. 8.2.3, than the SDK is not 64-bit compatible. Make sure you compile your application as a 32-bit project (switch TargetPlatform from the default AnyCpu to x86), or better yet, update to our 64-bit compatible Framework SDK!

      • Unfortunately it is not possible to compile my app as 64 bit as I am using codesmith and nettiers. Could you please tell me simply what I need to do to print a label? I have uninstalled everything to do with Dymo and am pretty much at the stage of starting again. Am a bit confused with all the different versions out there now.

      • Hi I have installed the latest version of the beta SDK and DLS, removed all instances to Dymo, added a reference to DLS7 Compatibility COM Type Library 1.0. This is the only reference I have to anything related to Dymo. I recompile my project.

        I use the following code to get a list of printers:

        DymoAddIn _dai = new DymoAddInClass();
        DymoLabels _dl = new DymoLabelsClass();
        string PrtNames = _dai.GetDymoPrinters();

        if (PrtNames != null)
        // parse the result
        int i = PrtNames.IndexOf(‘|’);
        while (i >= 0)
        LabelWriterCmb.Items.Add(PrtNames.Substring(0, i));
        PrtNames = PrtNames.Remove(0, i + 1);
        i = PrtNames.IndexOf(‘|’);
        if (PrtNames.Length > 0)
        this.LabelWriterCmb.Items[0].Selected = true;


        I publish this project (ASP.Net) to my windows Web Server 2008 (64 Bit) and run the page.

        I get the following error:

        Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80040154

      • I have now given up on the COM route and have decided to try the DYMO.Label.Framework .Net which is included in the latest Beta package.

        I install this on my Windows 7 64-bit development machine and I can loop through printers with the following code:

        foreach (IPrinter ipe in Framework.GetPrinters())

        However, when I publish my application to my Windows 2008 Web Server 64 bit machine, no printers are picked up and there is no error given. The Web Server has identical software version installed and if I load the DLS GUI up it detects the installed printers on the web server and I am able to print to them.

        The framework is a lot easier for me to use so I would like to go down this route but it looks once again like there are problems I cannot seem to find the route of.

        Would be grateful for any help on this.

        • could you try running DbgView to grab debug messages? Also, even most of new API is written in .NET there are still two COM libraries (DYMOBarcode.dll and DYMOPrintingSupport.dll) and these libraries requires special handling when running from IIS. Either use impersonation or set DCOM permissions to these libraries. See these comments #1, #2, and #3

      • Hi Vladimir – I have used impersonation. It works perfectly on my Windows 7 debug machine but not on the Windows Web Server 2008 machine.

        There are no error like before but the printer list is empty.

  15. Hi there,

    We have developed an application to print labels via the Dymo LabelWriter 400. We have deployed the application to multiple machines (which work). I have now deployed to another machine and am receiving the following error:

    Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 800706ba.

    We are using LabelSoftware 7.6, so are currently not using the latest SDK. Upgrading would mean huge changes to the existing application. Can someone assist me with this?

  16. We are also having a similar problem with error 80040154. Our dev team works on a web site project in C#, ASP.Net and unfortunately the only configuration it can be built to is “Any CPU”.

    We are using the DymoAddIn object. It works fine on our dev machine (Windows 7) but when rolled out to Windows Web Server 2008 (x64) we get the 80040154 error.

    We have enabled impersonation and also configured the app to use Apartment threading model. The app pool is also configured to allow 32 bit applications.

    Is there an official release on the horizon to iron out all of these bugs?


    • make sure you have the beta version installed on the server, it is the only version that supports 64-bit.

      please run DbgView on the server to capture log messages from the sdk. you can e-mail the log to vbuzuev at dymo . com

  17. Hello,

    i developed an application in Vb with VB Express 2010 which allow to print labels on DYMO Label Writer 450 from a model. it works fine when i use the pc where i developped this application but when i try on another pc it doesn’t work and i’ve the following error: “La cration d’une instance du composant COM avec Le CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} à partir de IClassFactory a échoué en raison de l’eeruer suivante: 80040154″

    i tried to delete reference in my project and add “DLS7 Compatibility COM Type Library 1.0″ COM library” and it still doesn’t work.

    Could you help me please?

  18. DymoAddIn.Open
    Keeps failing upon deployment on client machine

  19. Hi,
    I have used the SDK and the instructions above to install the DLL, and followed the examples in the sample code for VB.NET to print labels from a desktop application.
    This has been working fine for debugging and running locally.
    However, when publishing this on a server, I get the dreaded error 80040154!
    I have tried installing SDK, Label software, and the BETA-file on the server, but nothing has worked.
    Anybody please able to give any suggestions?

    Rune Borgen
    Cadnet Solutions

    • Hi Rune,

      First, try to install (on the server) the latest DYMO Label version 8.3, it is available from here. If it does not help, could you please describe the configuration of the application? application type (desktop/service/ASP.NET/etc, app architecture 32-bit/64-bit/AnyCPU, installation type (ClickOnce/etc), Windows version, etc. What is the exact error message? are there any problem running DYMO Label software itself? if yes, collect log files using LWSupport utility located in Support subfolder of the DLS installation folder.

  20. Hi Vladimir,
    I have tried to install v8.3 of DYMO Label, but it hasn’t helped.
    I am now getting a slightly different error:
    Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to following error: 80004003

    It is a desktop application, 32-bit, to be installed on Windows Server 2003.
    The application is installed (I just copy the release files to the server in stead of ‘clickOnce’) and run from the server while the printer is plugged into the user’s laptop.

    I hope you can help me with this.

  21. I having a similar problem… Everything is installed and running on the client XP SP2 workstation. Here are the specifics:

    Can you please advise me as to the root cause of the execution exception that is thrown while attempting substantiate the DymoAddinClass:

    My setup is as follows:
    1.) Window XP SP2 workstation
    2.) VS 2008 Web Developer Express
    3.) Installed the Dymo label software version 8.3 (downloaded 1/21/11).
    4.) Installed latest v.8 Software Developer’s Kit (downloaded 1/21/11).
    5.) Setup the ASP.NET Sample C# application in VS 2008 from the SDK download.
    5.) Project successfully compiles
    6.) While debugging the _Default code behind class abends at line 15. The _Default class is attempting to substantiate DymoAddInClass . I receive the following error message:

    Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80040154.

    7.) The bin folder contains the following DLL:

    Interop.Dymo.dll 12/17/2009 7:43 PM

    Paul Dietz

  22. I have been stuck on this for a while now error: 80040154 & 80004003

    My Setup:
    1) Windows Vista 32bit
    2) VS 2008 Professional
    3) Installed the latest Dymo label software
    4) Installed the latest SDK
    5) Same issue as post 21 crashes at that line in the code for the c# example.

    I run the DebugView tool and get: [6992] LoadCurrentLocation(): no location found in the Registry, got system location ‘US’

    • Did you re-import all Interop references to SDK libraries? Meaning…
      Step 1: open your project in VS 2008 (the C# sample)
      Step 2: Remove Interop.Dymo.dll from the project settings
      Step 3: Add a reference to ‘DLS7 Compatibility COM Type Library 1.0′. You should see the ‘Add Reference’ dialog. Click on the COM tab and browse for the aforementioned library.
      Step 4: Re-compile your application (the same C# sample)

      • Yep did those steps. Is it possible to get this error if you don’t have the printer hooked up to the machine I am compiling this on? Right now the client has the printer and I was just testing out the code in the SDK c# and asp.net example (same error for both).

      • I think I answered my own question. I just attached a DYMO printer from the control panel (not physically connected) and the code runs.

  23. I’m also experiencing the same issue and I’m a little confused as what to do in this case.

    Here’s my setup:

    Dev machine
    1. Windows 7 Ultimate x64
    2. Visual Studio 2010 Ultimate
    3. Installed the latest DYMO Label software (v8.3.0.1242)
    4. Installed the latest SDK (not the beta)

    Testing environment
    1. Windows Server 2008 R2 x64 (nuff said)

    When I run my website within the VS environment it works fine! When I promote it to our testing environment, that’s when I get the error when trying to print a label. Also, being that it’s a website and not a web application, I can not change the target platform from Any CPU to x86.

    After reading all posts from above, I’m a little confused with some of the responses.

    In post #22’s reply, I see where it says to remove the Interop.Dymo.dll (which I’ve done) but when adding the reference to ‘DLS7 Compatibility COM Type Library 1.0′, I only see the following:

    1. DLS SDK COM Type Library (DLSSDKCOMLibrary.dll)
    2. DYMO Addin User Interface Assembly (DYMOAddinUI.tlb)
    3. DYMO Label Framework (DYMO.Label.Framework.tlb)
    4. DYMO Label Software v.8 SDK (DYMO.DLS.SDK.tlb)
    5. DYMO Univeral Add-in 2.0 Type Library (DymoUniversalAddin.dll)
    6. DYMO_SmartPaste (DYMO.SmartPaste.tlb)
    7. DYMOBarcode 2.0 Type Library (DYMOBarcode.dll)
    8. DYMOLabelFrameworkIEPlugin 1.0 Type Library (DYMOLabelFrameworkIEPlugin.dll)
    9. DYMOPrintingSupport 1.0 Type Library (DYMOPrintingSupport.dll)

    I don’t see the aforementioned library anywhere in the ‘Add Reference’ window.

    Also there was another post where the DYMO label needs to be installed on the server also, is this true?

    Thank you…

    • To use DLS SDK API import DLS SDK COM Type Library (DLSSDKCOMLibrary.dll).

      DYMO Label software should be installed on a machine where you are calling SDK functions. If you are calling it on the server, then DYMO Label software should be installed on the server. Look at http://developers.dymo.com/2010/06/15/label-printing-and-web-deployment/ for more information.

      .NET is not “enabled” by default on Windows Server 2008 R2. To enable:
      • Click Start -> Control Panel
      • In Programs group click on “Turn Windows features on or off
      • Click on “Add Features”
      • Check that “.NET Framework 3.5.1 Features” are installed. If not check and install.

      • Hey Vladimir,

        Thanks for the for prompt reply! I’ve installed the latest DYMO Label software on the server hoping that would but now I’m getting a different error when trying to print:

        Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80004003.

        What am I missing?


  24. Hey Vladimir,

    1. Yes .NET 3.5.1 was already enabled.
    2. What’s the reason why I need to have a printer connected to the server? Also being that this server is virtual server, it’s going to be difficult to do so.


  25. Hi Vladimir,
    I installed version un Web Server 2008 32 bit,
    I add as References DLS 7 Compatibility.. as COM.
    I use IIS 7.0 and VS 2010 asp .net 4.0, when I write in my code:
    DymoAddInClass _dymoAddin = new DymoAddInClass();
    DymoLabelsClass _dymoLabel = new DymoLabelsClass();

    It requires user and password: I use administrator pwd, I try this 2 times
    then returns the same error:

    Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80070005.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    I gave everyone complete to the folder, windows authentication.. where I wrong?????

  26. Hi all,

    Unfortunately I’ve seen this page too many times, it seems to be the Dymo 80040154 headquarters. But today I fixed it!, and I have two things that may have done the trick:

    1) It might be that the console is less mighty than a remote desktop session. I installed (and uninstalled, and reinstalled ad infinitum) the latest software using VNC on the console. The latest try was not to do that, but install it being logged on as an administrator

    2) Actually “Register” the software. I you start the normal software to create a label (which always worked by the way), it starts with a nag screen. This time I actually did not press “yeah yeah, I may do that some time”. A hypothesis is that the API may want to show the same nag screen but is not allowed to for a wide range of reasons I can think of.

    One of these did the big trick for me.

  27. I’m trying to set up a printer on my server (Scenario #2 as described here: http://developers.dymo.com/2010/06/15/label-printing-and-web-deployment/) but I am getting the following error: “Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80070005.” I have tried changing the COM permissions on all DYMO services (DYMO Pnp service, DYMOBarcode, DYMOLabelFrameworkIEPlugin, DYMOPrintingSupport, and DYMOUniversalAddin) and I’m still getting this error. I’m trying to use the sample provided in the “ASP.NET Sample” folder in the DYMO Label v.8 SDK installation folder as a starting point for development but this error is hindering any sort of prgress what-so-ever. Any suggestions would be great, and thank you very much in advance.


    • Make sure you have the latest DYMO Label installed, it is available from http://sites.dymo.com/Support/Pages/AllDriversUsers.aspx?Type=Drivers

      The GUID is for DLSSDKCOMLibrary.dll, modify DCOM rights for this dll as well.

      • Ok, I did that, and went back to getting a 80040154 error, so I tried removing the Interop.Dymo.dll and added the DLS7 Compatibility COM Type Library 1.0 by way of the DLS SDK COM Type Library because I, like Eddie, did not see the DLS7… in the COM listing. once I completed that it went right back to the 80070005 error. Could there be something I’m missing?


        • Hi John,

          Could you please send an e-mail to {sdkreply at newellco com} and describe all the steps you did. Please include all the GUIDs and error codes. Also, in case you use .NET, I would recommend using DYMO Label Framework API, it is easy to setup, use, and troubleshoot.

  28. Hi,

    How can I work with lwl files in DYMO.Labels.Framework?

    When I try to open old format label I obtain error:
    {“Unable to load label template”}
    {“Data at the root level is invalid. Line 1, position 1.”}

    How to convert automatically or how to open this type of labels?

  29. Hey Guys,
    I am getting similar error ‘Creating an instance of the COM component with CLSID {09DAFAE2-8EB0-11D2-8E5D-00A02415E90F} from the IClassFactory failed due to the following error: 80040154′. Is there a fix to this issue?

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>