I created ASP.NET application by using Coreservice.
The application is placed in SDL Web folder.
C:\Program Files (x86)\SDL Web\web\custompage\index.aspx
I upgraded Tridion 2013 SP1 to SDL Web 8.5, and the ASP.NET application was used on Tridion 2013, so 2013's endpoint is used. SDL says SDL Web8.5's Coreservice is compatible with Tridion 2013's.
SDL Web 8.5 is configured to use LDAP authentication.
In ASP.NET code, no user and password is specified and ISessionAwareCoreService is working normally. I think it is run by NTAUTHORITY\NETWORK SERVICE user.
But when IStreamDownload's method is called, following error occurs.
[MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Basic realm="xxxxxxx"'.]
I can not understand the reason why only IStreamDownloadis failed at authentication. Also same code was working at Tridion 2013.
Does anyone know how to make IStreamDownloadwork?
Source code and binding setting is following.
ChannelFactory<ISessionAwareCoreService> factory = new ChannelFactory<ISessionAwareCoreService>("wsHttp_2013"); factory.Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials; coreServiceClient = factory.CreateChannel();
<binding name="wsHttp" transactionFlow="true" maxReceivedMessageSize="10485760"> <readerQuotas maxStringContentLength="10485760" maxArrayLength="10485760"/> <security mode="Message"> <message clientCredentialType="Windows"/> </security> </binding>
ChannelFactory<IStreamDownload> factory = new ChannelFactory<IStreamDownload>("basicHttp_2013"); factory.Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials; IStreamDownload streamClient = factory.CreateChannel(); Stream stream = null; MemoryStream memStream = null; stream = streamClient.DownloadBinaryContent(mmcTcmId);
<binding name="StreamDownload_basicHttpBinding" maxReceivedMessageSize="629145600" transferMode="StreamedResponse" messageEncoding="Mtom" sendTimeout="00:10:00"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" /> </security> </binding>