I'm currently trying to Connect to Alfresco (DMS), using DotCMIS/C#, so that I can create/locate/retrieve/archive files from it through my program.
Alfresco Version: alfresco-enterprise-5.0.0.5-installer-win-x64
Reference: https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html
Note: I tried different "AtomPubUrl" to test which URL might work.
List of "AtomPubUrl" according to their versions:
[CMIS v1.0]
For Alfresco Version 3.x: http://[host]:[port]/alfresco/service/cmis
For Alfresco 4.0.x and Alfresco 4.1.x : http://[host]:[port]/alfresco/cmisatom
For Alfresco 4.2: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.0/atom
[CMIS v1.1]
For Alfresco 4.2: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.1/atom
[CMIS v1.0]
For Alfresco Version 3.x: http://[host]:[port]/alfresco/service/cmis
For Alfresco 4.0.x and Alfresco 4.1.x : http://[host]:[port]/alfresco/cmisatom
For Alfresco 4.2: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.0/atom
[CMIS v1.1]
For Alfresco 4.2: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.1/atom
Here's my code:
C#
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
//parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/service/cmis";
//Throws: "Not Found"
//parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/cmisatom";
//Throws: "Unauthorized"
//parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom";
//Throws: "Unauthorized"
//parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom";
//Throws: "Unauthorized"
parameters[DotCMIS.SessionParameter.User] = "admin ";
parameters[DotCMIS.SessionParameter.Password] = "admin";
SessionFactory factory = SessionFactory.NewInstance();
ISession session = factory.GetRepositories(parameters)[0].CreateSession();Can somebody explain me why am I encountering these errors? or What is wrong with my code?
Best Regards!
Have a nice day.
Ram Alla59 pointsPosted Aug 10, 2016, 3:54 AM EDT