Trong khi cố gắng để kết nối với các dịch vụ cốt lõi tôi nhận được lỗi sau:Tridion 2011 Dịch vụ cốt lõi: Không thể kết nối trong một môi trường SSO
The HTTP request was forbidden with client authentication scheme 'Anonymous'
Môi trường Tridion được cấu hình với SSO từ SiteMinder.
Dưới đây là mã của tôi:
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();
}
Có ai có kinh nghiệm tương tác với các dịch vụ cốt lõi với một kiểu xác thực khác so với Windows?
UPDATE:
bây giờ tôi nhận được lỗi:
The HTTP request was forbidden with client authentication scheme 'Basic'.
clientCredentialType gì nên được sử dụng trong /webservices/web.config cho các ràng buộc?
Khi tôi bỏ ghi chú SsoAgentHttpModule trong /webservies/web.config, chúng tôi gặp lỗi 500 trên webservice, vì vậy SDL đã nói với chúng tôi để lại nhận xét này.
Tôi lấy mô-đun này là bắt buộc để CoreService xác thực với lược đồ xác thực 'Cơ bản'?
Bạn không cần phải bỏ ghi chú SsoAgentHttpModule trong /webservices/web.config vì bạn đã bỏ ghi chú trong cấu hình gốc và nó được thúc đẩy cho toàn bộ trang web. Bạn có chắc là bạn đang kết nối với đúng (url SSO) không? –