-1

i am trying to automate item selection of content porting in tridion 2013 sp1 .

so i have referenced all content porting import export dlls (Tridion.ContentManager.ImportExport.Packaging; Tridion.ContentManager.ImportExport.Client; Tridion.ContentManager.ImportExport;) of content porting import export service and Tridion.Common.dll and

i have changed in binding to perform import export of CP pkg.

binding config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="ImportExport_basicHttpBinding" maxReceivedMessageSize="41943040">
              <readerQuotas maxStringContentLength="41943040" maxArrayLength="41943040" />
              <security mode="TransportCredentialOnly">
                <!-- For LDAP or SSO authentication of transport credentials, use clientCredentialType="None" -->
                <transport clientCredentialType="Windows" />
              </security>
            </binding>
            <binding name="ImportExport_StreamDownload_basicHttpBinding" maxReceivedMessageSize="2147483648" transferMode="StreamedResponse" messageEncoding="Mtom" sendTimeout="00:30:00">
              <security mode="TransportCredentialOnly">
                <!-- For LDAP or SSO authentication of transport credentials, use clientCredentialType="None" -->
                <transport clientCredentialType="Windows" />
              </security>
            </binding>
            <binding name="ImportExport_StreamUpload_basicHttpBinding" maxReceivedMessageSize="2147483648" transferMode="StreamedRequest" messageEncoding="Mtom" receiveTimeout="00:30:00">
              <security mode="None" />
              <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" />
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint name="basicHttp_2013" address="http://localhost/webservices/ImportExportService2013.svc/basicHttp" binding="basicHttpBinding" bindingConfiguration="ImportExport_basicHttpBinding" contract="Tridion.ContentManager.ImportExport.Client.IImportExportService" />
          <endpoint name="streamDownload_basicHttp_2013" address="http://localhost/webservices/ImportExportService2013.svc/streamDownload_basicHttp" binding="basicHttpBinding" bindingConfiguration="ImportExport_StreamDownload_basicHttpBinding" contract="Tridion.ContentManager.ImportExport.Client.IImportExportStreamDownload" />
          <endpoint name="streamUpload_basicHttp_2013" address="http://localhost/webservices/ImportExportService2013.svc/streamUpload_basicHttp" binding="basicHttpBinding" bindingConfiguration="ImportExport_StreamUpload_basicHttpBinding" contract="Tridion.ContentManager.ImportExport.Client.IImportExportStreamUpload" />
        </client>
      </system.serviceModel>
    </configuration>

my code:
List<string> foo = new List<string>();
foo.Add("tcm:abc-pqrs");
 **if (client.InnerChannel.State != System.ServiceModel.CommunicationState.Faulted)**
            {
var client = new ImportExportServiceClient();
var selection = new[] { new ItemsSelection(itemsList) };
string processId = client.StartExport(selection, new ExportInstruction());//from this `process id i can get export package` 
//var downloadpkg = new IImportExportService2013();
//downloadpkg.DownloadPackage("processid",false); 
}
else{
//create client object if channnal in faulted state
}

but my service channal in going in faulted state... because of (tridion.common.dll)dll missing when i add this dll to the solution it is conflicting(dereferencing my other dll(importExport dlls of content porting)) i am not able to find problem.is this issue of dlls ?or tridion sp1 2013? please suggest.

Thanks in Advance

5
  • Provide exact error "because of (tridion.common.dll)dll missing" (try to find it in the eventviewer). Clarify this "it is conflicting(dereferencing my other dll". Which exactly dlls are conflicted ? Btw, do you use "Tridion.ContentManager.ImportExport.Client.dll" or build proxy within Visual Studio?
    – Syav4eg
    Dec 12 '14 at 8:27
  • hi @Syav4eg i added dll names please check
    – Pankaj786
    Dec 12 '14 at 8:33
  • Where are you getting the DLLs from that your project is referencing, are you sure you are using the right versions? Please edit your question and update it with more relevant information like a detailed error message (from visual studio) and what exactly do did to come to this result. Dec 12 '14 at 9:01
  • @Pankaj786, I think you don't need to make a reference to "Tridion.ContentManager.ImportExport" at all! It is semi-internal assembly with import-export BL (btw, where have you taken it? GAC? You need to take only client dll-s in the client folder of the Tridion). Did you look to event viewer ?
    – Syav4eg
    Dec 12 '14 at 9:08
  • solved.... it is conflict between my service and dlls i referenced so it is not genrating classes in reference.cs
    – Pankaj786
    Dec 12 '14 at 9:44
1

Maybe I'm seeing it wrong but are you actually trying to run the content porter import export service on your local development machine? I'm quite sure that is not a formally supported scenario (Tridion is not guaranteed to work on unsupported OSes and no desktop OSes are currently supported afaik).

Having said that, you can make it work BUT it is not a simple task and requires lots of trial and error (finding what DLLs you need, some of those are in GAC on the server so you need to copy them, license files, config files, etc); I've never tried myself so I cannot give you a step-by-step guide (just a warning that doing it will take time and effort; i've at one point successfully run up a complete Tridion render engine on my local workstation inside Visual Studio but it took me a few days to figure out how to do it and what I needed).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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