AnsweredAssumed Answered

Attempting to connect to repository, getting 'DotCMIS.Exceptions.CmisConnectionException' and unsure why.

Question asked by goebelchase on Jul 28, 2014
Latest reply on Jul 28, 2014 by goebelchase
I am attempting to connect some C# code to an alfresco database, and I have two questions.  Firstly, I am unsure of where to find the 'Repository ID', I have looked at the details page of the repository I need to connect to, but I didn't see anything that seemed to fit the bill.
Additionally, when I run the code below, I get a result of "A first chance exception of type 'DotCMIS.Exceptions.CmisConnectionException' occurred in DotCMIS.dll" but have been unable to find any information about what this message entails.

            Dictionary<string, string> parameters = new Dictionary<string, string>();
            parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
            parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/service/cmis/index.html";
            parameters[DotCMIS.SessionParameter.User] = "admin";
            parameters[DotCMIS.SessionParameter.Password] = "password";
            parameters[DotCMIS.SessionParameter.RepositoryId] = "<repositoryId>";

            SessionFactory factory = SessionFactory.NewInstance();
            ISession session = factory.CreateSession(parameters);

            IFolder rootFolder = session.GetRootFolder();
            foreach (ICmisObject cmisObject in rootFolder.GetChildren())
        catch(Exception ex)

I thought the error might be due to me leaving a placeholder value for 'RepositoryID', but I'm not sure.
Any help or information you could offer would be very much appreciated.
Thank you in advance.