8

I'm in the process of upgrading a Tridion instance from 5.2 to 2011 SP1 HR1.

Everything has gone smoothly in the upgrade - namespaces have been updated for the new Content Delivery dlls etc and everything is publishing and running correctly.

However, I'm now getting an issue with a couple of custom pages and having never developed on Tridion 5.2, I'm struggling to see if this is an upgrade (deprecated) issue, configuration issue or something else.

Both of the custom pages attempt to read data from Tridion using TDS in the following way:

using TDS;
...

TDSE t = new TDSE();
Publication pub = t.GetPublication([tcmid]);

However, this is throwing the following error:

Unable to case COM object of type 'TDS.TDSEClass' to interface type 'TDS._TDSE'. This operation failed because the QueryInterface call on the COM component for the interface with IID {...} failed due to the following error: No such interface supported.

Is this something that has been deprecated in 2011 SP1 and will need a rewrite or am I just missing configuration for this?

Any help is greatly appreciated here.

4 Answers 4

10

I just wrote the following console app

using Tridion.ContentManager.Interop.TDS;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            TDSE t = new TDSE();
            Publication pub = t.GetPublication("tcm:0-417-1");
            String title = pub.Title;

        }
    }
}

And can confirm that it works fine on SDL Tridion 2011 SP1 HR1. The only reference I have added to my project is Tridion.ContentManager.Interop.cm_tom from the PIA directory.

1
  • Cheers Chris, worked perfectly. Commented Mar 4, 2013 at 8:46
6

Is your code compiled against the old interop DLL from 5.2, or even against a self-created interop DLL? If so, fix up the reference in your project to point to the 2011 primary interop assembly, (C:\Program Files (x86)\Tridion\bin\client\PIA\Tridion.ContentManager.Interop.cm_tom.dll) and recompile.

2
  • 1
    You may also have to copy those DLLs to the /bin folder of the CM website for your custom pages to work. Of course, you should consider updating to NOT use COM, but we all know that's easier said than done.
    – Nuno Linhares
    Commented Mar 2, 2013 at 8:41
  • Thanks Dominic - although Chris had already given the answer I needed, your link to the file saved me a fair bit of time trawling the Tridion directory looking for the right dll! Commented Mar 4, 2013 at 8:47
4

Does your .net project have the SDL Tridion 'PIA' Dlls in the bin directory where this code is running?

You may also need to initialize the TDSE objet and provide an impersonation user.

1
  • This should really be a comment, and not an answer. No need to call initialize() either Commented Mar 1, 2013 at 21:33
2

Just wanted to add here that Chris' response was correct and fixed the issue however, I also came across a similar issue within this project with accessing TDSDefines.

This was fixed in the same way as before:

Add the Tridion.ContentManager.Interop.cm_defines.dll from C:\Program Files (x86)\Tridion\bin\client\PIA\ to the project which should then allow uses of TDSDefines to resolve correctly against the 2011 interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.