Hi, I have some trouble with dotCMIS and Sharepoint 2010. Im not even able
to connect with dotCMIS to my spserver.
Im working with C# and I have something like this:
Dictionary<string, string> parameters = new Dictionary<string,
string>();
parameters[SessionParameter.BindingType] = BindingType.AtomPub;
parameters[SessionParameter.AtomPubUrl] = "http://spserver\cmis";
parameters[SessionParameter.User] = "domain\\user";
parameters[SessionParameter.Password] = "pass";
SessionFactory factory = SessionFactory.NewInstance();
ISession session =
factory.GetRepositories(parameters)[0].CreateSession();**
I get the exception:
DotCMIS.Exceptions.CmisRuntimeException was unhandled
Message=Unauthorized
Source=DotCMIS
StackTrace:
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Read(UrlBuilder
url) in C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line 436
at
DotCMIS.Binding.AtomPub.AbstractAtomPubService.GetRepositoriesInternal(String
repositoryId) in
C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line 675
at
DotCMIS.Binding.AtomPub.RepositoryService.GetRepositoryInfos(IExtensionsData
extension) in C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line
835
at
DotCMIS.Binding.Impl.BindingRepositoryService.GetRepositoryInfos(IExtensionsData
extension) in C:\cmis_trunk\release-src\src\binding\binding-impl.cs:line 436
at DotCMIS.Client.Impl.SessionFactory.GetRepositories(IDictionary`2
parameters, IObjectFactory objectFactory, AbstractAuthenticationProvider
authenticationProvider, ICache cache) in
C:\cmis_trunk\release-src\src\client\client-impl.cs:line 68
at DotCMIS.Client.Impl.SessionFactory.GetRepositories(IDictionary`2
parameters) in C:\cmis_trunk\release-src\src\client\client-impl.cs:line 61
at CMIS.Program.Main(String[] args) in
C:\Users\Administrator\documents\visual studio
2010\Projects\CMIS\CMIS\Program.cs:line 35
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
If I want to login via browser, everything is fine. I tried also to change
domain\\user to systemadmin, but I get the same exception. If I look into
the Sharepoint logs Im not getting that much information, there is only:
Medium Leaving Monitored Scope (Timer Job job-timer-locks). Execution
Time=1.19680015197462 dd24d793-e2d9-41e9-b942-73d10788e778
06/13/2012 01:10:36.78 w3wp.exe (0x01B8)
0x0F0C SharePoint Foundation Monitoring
nasq Medium Entering monitored scope (Request (GET:
http://spserver:80/cmis))
06/13/2012 01:10:36.78 w3wp.exe (0x01B8)
0x0F0C SharePoint Foundation Logging Correlation Data
xmnv Medium Name=Request (GET:http://spserver:80/cmis)
1897bc61-303a-4530-a2c4-9d772a5589e6
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x06E4 SharePoint Foundation General
af71 Medium HTTP Request method: GET
1897bc61-303a-4530-a2c4-9d772a5589e6
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x06E4 SharePoint Foundation General
af75 Medium Overridden HTTP request method: GET
1897bc61-303a-4530-a2c4-9d772a5589e6
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x06E4 SharePoint Foundation General
af74 Medium HTTP request URL: /cmis
1897bc61-303a-4530-a2c4-9d772a5589e6
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x0F0C SharePoint Foundation Monitoring
b4ly Medium Leaving Monitored Scope (Request (GET:
http://spserver:80/cmis)). Execution Time=7,10481360061125
1897bc61-303a-4530-a2c4-9d772a5589e6
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x0D20 SharePoint Foundation Monitoring
nasq Medium Entering monitored scope (Request (GET:
http://spserver:80/cmis/Forms/AllItems.aspx))
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x0D20 SharePoint Foundation Logging Correlation Data
xmnv Medium Name=Request (GET:
http://spserver:80/cmis/Forms/AllItems.aspx)
0550c9be-147c-41da-a9cd-911e1da5f796
06/13/2012 01:10:36.79 w3wp.exe (0x01B8)
0x0D20 SharePoint Foundation Monitoring
b4ly Medium Leaving Monitored Scope (Request (GET:
http://spserver:80/cmis/Forms/AllItems.aspx)). Execution
Time=0,346412742401618 0550c9be-147c-41da-a9cd-911e1da5f796
06/13/2012 01:10:38.63 OWSTIMER.EXE (0x086C)
0x0908 SharePoint Foundation Monitoring
nasq Medium Entering monitored scope (Timer Job
job-application-server) 6a3e08c2-02ac-4dc8-8e82-e72120ef1331
06/13/2012 01:10:38.63 OWSTIMER.EXE (0x086C)
0x0908 SharePoint Server Search Administration
eff0 High synchronizing search data access service
instance 6a3e08c2-02ac-4dc8-8e82-e72120ef1331
06/13/2012 01:10:39.67 OWSTIMER.EXE (0x086C)
0x0908 SharePoint Foundation Monitoring
b4ly
Then I saw this post here about the ntlm authentication:
https://issues.apache.org/jira/browse/CMIS-531
I thought that could help, because Im using NTLM (standard on sharepoint
2010). So I added:
parameters[SessionParameter.AuthenticationProviderClass] =
"DotCMIS.Binding.NtlmAuthenticationProvider";
But now Im in trouble with another exception:
DotCMIS.Exceptions.CmisConnectionException was unhandled
Message=Parsing exception!
Source=DotCMIS
StackTrace:
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Parse[T](Stream
stream) in C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line 416
at
DotCMIS.Binding.AtomPub.AbstractAtomPubService.GetRepositoriesInternal(String
repositoryId) in
C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line 676
at
DotCMIS.Binding.AtomPub.RepositoryService.GetRepositoryInfos(IExtensionsData
extension) in C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line
835
at
DotCMIS.Binding.Impl.BindingRepositoryService.GetRepositoryInfos(IExtensionsData
extension) in C:\cmis_trunk\release-src\src\binding\binding-impl.cs:line 436
at DotCMIS.Client.Impl.SessionFactory.GetRepositories(IDictionary`2
parameters, IObjectFactory objectFactory, AbstractAuthenticationProvider
authenticationProvider, ICache cache) in
C:\cmis_trunk\release-src\src\client\client-impl.cs:line 68
at DotCMIS.Client.Impl.SessionFactory.GetRepositories(IDictionary`2
parameters) in C:\cmis_trunk\release-src\src\client\client-impl.cs:line 61
at CMIS.Program.Main(String[] args) in
C:\Users\Administrator\documents\visual studio
2010\Projects\CMIS\CMIS\Program.cs:line 35
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Xml.XmlException
Message=For security reasons DTD is prohibited in this XML document.
To enable DTD processing set the DtdProcessing property on
XmlReaderSettings to Parse and pass the settings into XmlReader.Create
method.
Source=System.Xml
LineNumber=0
LinePosition=0
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at DotCMIS.Binding.AtomPub.AtomPubParser.Parse() in
C:\cmis_trunk\release-src\src\binding\atompub\atompub-parser.cs:line 88
at
DotCMIS.Binding.AtomPub.AbstractAtomPubService.Parse[T](Stream stream) in
C:\cmis_trunk\release-src\src\binding\atompub\atompub.cs:line 412
InnerException:
So any ideas, what could I try? Im not that good with Sharepoint, maybe I
just have to change some few things in the SP security settings and thats
it. How do you guys are using dotCMIS + Sharepoint2010? Thank you!