Durante il tentativo di connettersi al servizio Nucleo ottengo il seguente errore:Tridion 2011 Servizio principale: impossibile collegare in un ambiente SSO
The HTTP request was forbidden with client authentication scheme 'Anonymous'
L'ambiente Tridion è configurato con SSO da SiteMinder.
Ecco il mio codice:
public static ICoreService2010 GetTridionClient()
{
var binding = new BasicHttpBinding()
{
Name = "BasicHttpBinding_TridionCoreService",
CloseTimeout = new TimeSpan(0, 1, 0),
OpenTimeout = new TimeSpan(0, 1, 0),
ReceiveTimeout = new TimeSpan(0, 10, 0),
SendTimeout = new TimeSpan(0, 1, 0),
AllowCookies = false,
BypassProxyOnLocal = false,
HostNameComparisonMode = HostNameComparisonMode.StrongWildcard,
MaxBufferSize = 4194304, // 4MB
MaxBufferPoolSize = 4194304,
MaxReceivedMessageSize = 4194304,
MessageEncoding = WSMessageEncoding.Text,
TextEncoding = System.Text.Encoding.UTF8,
TransferMode = TransferMode.Buffered,
UseDefaultWebProxy = true,
ReaderQuotas = new System.Xml.XmlDictionaryReaderQuotas()
{
MaxDepth = 32,
MaxStringContentLength = 4194304, // 4MB
MaxArrayLength = 4194304,
MaxBytesPerRead = 4194304,
MaxNameTableCharCount = 16384
},
Security = new BasicHttpSecurity()
{
Mode = BasicHttpSecurityMode.TransportCredentialOnly,
Transport = new HttpTransportSecurity()
{
ClientCredentialType = HttpClientCredentialType.None,
},
Message = new BasicHttpMessageSecurity()
{
ClientCredentialType = BasicHttpMessageCredentialType.UserName
}
}
};
string hostname = ConfigurationManager.AppSettings["TridionUrl"];
string username = ConfigurationManager.AppSettings["TridionUsername"];
hostname = string.Format("{0}{1}{2}",
hostname.StartsWith("http") ? "" : "http://",
hostname,
hostname.EndsWith("/") ? "" : "/");
var endpoint = new EndpointAddress(hostname +
"/webservices/CoreService.svc/basicHttp_2010");
var factory = new ChannelFactory<ICoreService2010>(binding, endpoint);
factory.Credentials.UserName.UserName = username;
return factory.CreateChannel();
}
Qualcuno ha esperienza di interazione con il servizio principale, con un tipo di autenticazione diverso da Windows?
UPDATE:
ora ottengo l'errore:
The HTTP request was forbidden with client authentication scheme 'Basic'.
Cosa clientCredentialType dovrebbe essere utilizzato nella /webservices/web.config per gli attacchi?
Quando interrompo il SsoAgentHttpModule in /webservies/web.config si ottiene un errore 500 sul servizio web, quindi SDL ci ha detto di lasciare questo commento.
Suppongo che questo modulo sia necessario per il CoreService per l'autenticazione con lo schema di autenticazione 'Base'?
Non è necessario decommentare SsoAgentHttpModule in /webservices/web.config in quanto è stato decommentato nella configurazione di base e viene propagato per l'intero sito Web. Sei sicuro di essere connesso a un indirizzo corretto (URL SSO)? –