1

SilverlightはoobモードでSSLをサポートしていますか?SSLをオンにしましたが、ブラウザで正常に動作しますが、oobモードに接続しません。足りないものはありますか?

ありがとう

編集:

_serviceHost = new ServiceHost(typeof(ApplicationService), new Uri(BaseAddress));

_serviceHost.Description.Behaviors.Add(new ServiceMetadataBehavior { HttpsGetEnabled = true });

var serviceBinding = new BasicHttpBinding(BasicHttpSecurityMode.Transport)
{
    MessageEncoding = WSMessageEncoding.Text,
    TextEncoding = Encoding.UTF8,
    BypassProxyOnLocal = false,
    UseDefaultWebProxy = true,
    CloseTimeout = new TimeSpan(10, 0, 0),
    OpenTimeout = new TimeSpan(10, 0, 0),
    SendTimeout = new TimeSpan(10, 0, 0),
    ReceiveTimeout = new TimeSpan(10, 0, 0),
    HostNameComparisonMode = HostNameComparisonMode.StrongWildcard,
    MaxBufferPoolSize = int.MaxValue,
    MaxReceivedMessageSize = int.MaxValue,
    AllowCookies = false,
    TransferMode = TransferMode.StreamedResponse,
    ReaderQuotas =
    {
        MaxDepth = 32,
        MaxStringContentLength = int.MaxValue,
        MaxArrayLength = 6553600,
        MaxBytesPerRead = 4096,
        MaxNameTableCharCount = 16384
    }
};

var policyRetrieverBinding = new WebHttpBinding(WebHttpSecurityMode.Transport)
{
    BypassProxyOnLocal = false,
    UseDefaultWebProxy = true,
    CloseTimeout = new TimeSpan(10, 0, 0),
    OpenTimeout = new TimeSpan(10, 0, 0),
    SendTimeout = new TimeSpan(10, 0, 0),
    ReceiveTimeout = new TimeSpan(10, 0, 0),
    HostNameComparisonMode = HostNameComparisonMode.StrongWildcard,
    MaxBufferPoolSize = int.MaxValue,
    MaxReceivedMessageSize = int.MaxValue,
    AllowCookies = false,
    TransferMode = TransferMode.StreamedResponse,
    ReaderQuotas =
    {
        MaxDepth = 32,
        MaxStringContentLength = int.MaxValue,
        MaxArrayLength = 6553600,
        MaxBytesPerRead = 4096,
        MaxNameTableCharCount = 16384
    }
};

//service endpoint
_serviceHost.AddServiceEndpoint(typeof(IApplicationService), serviceBinding, ServiceEndPoint);

//mex endpoint for metadata
_serviceHost.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), "mex");

//policy retriever endpoint
_serviceHost.AddServiceEndpoint(typeof(IPolicyRetriever), policyRetrieverBinding, string.Empty)
    .Behaviors.Add(new WebHttpBehavior());

//so we get detailed exceptions
_serviceHost.Description.Behaviors.Find<ServiceDebugBehavior>()
    .IncludeExceptionDetailInFaults = true;

_serviceHost.Open();

サービスエンドポイントは、以下を使用するように構成されています。

"https://" + Environment.MachineName
4

0 に答える 0