Hi Xi,

The Web Services binding uses UsernameToken by default for the authentication (as defined by the CMIS specification). Your server doesn't seem to support that.

To turn on HTTP authentication add this line:

parameters[SessionParameter.AuthenticationProviderClass] = "DotCMIS.Binding.NtlmAuthenticationProvider";

(Don't be confused by "NTLM". The authentication provider handles both, basic auth and NTLM.)


And a final note: Do not use the Web Services binding if you don't have to! It's slow and cumbersome.


- Florian



Hi all,

I tried to use the CMIS Web Service endpoint demo released in
*https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html
<https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html>*
to access to my database, but I got the authentication error as below:
The HTTP request is unauthorized with client authentication scheme
'Anonymous'. The authentication header received from the server was 'Basic
realm="Authentication required"'.

I'm sure I have specified the username&pwd correctly to my C# application,
please see the code below:

using DotCMIS;
using DotCMIS.Client;
using DotCMIS.Client.Impl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/*
*/

namespace testDotCmis
{
    class Program
    {
        static void Main(string[] args)
        {
            var parameters = new Dictionary<string, string>();

            parameters[SessionParameter.BindingType] =
BindingType.WebServices;
            parameters[SessionParameter.WebServicesRepositoryService] =
"https://[host address]/repositoryservice?wsdl";
parameters[SessionParameter.WebServicesAclService] = "https://[host
address]/aclservice?wsdl";
            parameters[SessionParameter.WebServicesDiscoveryService] =
"https://[host address]/discoveryservice?wsdl";
parameters[SessionParameter.WebServicesMultifilingService] =
"https://[host address]/multifilingservice?wsdl";
            parameters[SessionParameter.WebServicesNavigationService] =
"https://[host address]/navigationservice?wsdl";
            parameters[SessionParameter.WebServicesObjectService] =
"https://[host address]/objectservice?wsdl";
            parameters[SessionParameter.WebServicesPolicyService] =
"https://[host address]/policyservice?wsdl";
parameters[SessionParameter.WebServicesRelationshipService] =
"https://[host address]/relationshipservice?wsdl";
            parameters[SessionParameter.WebServicesVersioningService] =
"https://[host address]/versioningservice?wsdl";
            parameters[SessionParameter.User] = "[username]";
            parameters[SessionParameter.Password] = "[pwd]";


            SessionFactory factory = SessionFactory.NewInstance();

            var repoInfoList = factory.GetRepositories(parameters);
            Console.WriteLine("Test");
            Console.ReadKey();
        }
    }
}

I also tested with Atompub&browser, they worked perfectly.

            var parameters = new Dictionary<string, string>();
parameters[SessionParameter.BindingType] = BindingType.Browser;
            parameters[SessionParameter.BrowserUrl] = "https://[host
address]/browser";
            parameters[SessionParameter.User] = "[username]";
            parameters[SessionParameter.Password] = "[pwd]";
            SessionFactory factory = SessionFactory.NewInstance();

            var repoInfoList = factory.GetRepositories(parameters);

Could you help with this, please?

Reply via email to