Thursday, April 21, 2005

Starting with the basics

Well, this might be very basic stuff, but there's always a first time...

If you need to write an application that uses Tridion remotely, here's what you have to do:

1. Find a Tridion CM Server
2. Go to Administrative Tools -> Component Services
3. Expand Component Services -> Computers -> My Computer -> Com+ Applications
4. Right Click "Tridion Content Manager" and select "Export"
5. Click Next
6. Enter a file name and select "Export as Application Proxy" and click Next
7. Wait for a while ;-)
8. Click Finish

9. Go back to your development machine and get the file you exported.
10. Repeat steps 1, 2 & 3 (on your machine now, not the server)
11. Right-click Com+ Applications and select New -> Application
12. Click Next
13. Select Install pre-built application(s)
14. Browse to the MSI file you created and copied to this machine and open it
15. Click Next, select a directory (just leave default if you're not too picky) and click Next
16. Wait for a while ;-)
17. Click Finish

Tridion CM TOM 5.1 should now appear on your COM reference list, so that you can add it to your project.

And then you will not get 354 error messages from code like this:

static void Main(string[] args)
{

TDS.TDSE tdsClass = new TDS.TDSE();
Type tc = Type.GetTypeFromProgID("TDS.TDSE","VM2K3-NUNO",true);
tdsClass = (TDS.TDSE) Activator.CreateInstance(tc);
tdsClass.Impersonate("VM2K3-NUNO\\Administrator");

}



As I said, this is not rocket science, but you need to do it once to know it...

No comments: