I want to get the SharePoint document library data using CMIS

Here is my code:

Dictionary<string, string> parameters = new Dictionary<string, string>();
                parameters[SessionParameter.BindingType] = BindingType.AtomPub;
                parameters[SessionParameter.AtomPubUrl] = "http://zeus:18439/_vti_bin/cmis/rest/CD4E6A20-32DD-46F5-96A8-00EF7B754EC2?getRepositoryInfo";
                parameters[SessionParameter.User] = strSourceUserName;
                parameters[SessionParameter.Password] = strSourcePassword;
                SessionFactory factory = SessionFactory.NewInstance();
                migrateRepos = factory.GetRepositories(parameters);

I am getting an Unauthorized exception at GetRepositories() method. The stack trace is

at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Read(UrlBuilder url)
   at DotCMIS.Binding.AtomPub.AbstractAtomPubService.GetRepositoriesInternal(String repositoryId)
   at DotCMIS.Binding.AtomPub.RepositoryService.GetRepositoryInfos(IExtensionsData extension)
   at DotCMIS.Binding.Impl.BindingRepositoryService.GetRepositoryInfos(IExtensionsData extension)
   at DotCMIS.Client.Impl.SessionFactory.GetRepositories(IDictionary`2 parameters, IObjectFactory objectFactory, AbstractAuthenticationProvider authenticationProvider, ICache cache)
   at DotCMIS.Client.Impl.SessionFactory.GetRepositories(IDictionary`2 parameters)
   at ReadFileInfo.AlfrescoAnalysis.MigrateCMISData() in D:\TFS\Optimum - MigrationTools\Alfresco_Analysis\ReadFileInfo\AlfrescoAnalysis.cs:line 289

Glad for any help..Thanks



The Basic authentication is disabled for your web application.

You should be aware of using CMIS requires enabling Basic Authentication for your web application to avoid the Unauthorized exception.


You should Enable Basic Authentication to your Web Application at Claims Authentication Types by doing the following:

  • Open Central Administration > Application Management > Manage web application.

enter image description here

  • Click on your web application, from the above ribbon, select Authentication Provider.

  • Check Basic authentication (credentials are sent in clear text)

enter image description here

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.