Не удалось установить доверительные отношения для безопасного канала SSL/TLS с авторитетом '10 .137.4.121: 8086 SVCUTIL C#

Место общения программистов C#
Ответить Пред. темаСлед. тема
Anonymous
 Не удалось установить доверительные отношения для безопасного канала SSL/TLS с авторитетом '10 .137.4.121: 8086 SVCUTIL

Сообщение Anonymous »


Не удалось установить доверительные отношения для безопасного канала SSL/TLS с авторитетом '10 .137.4.121: 8086 SVCUtil WCF в сети проекта.
my file reference.cs < /code>: < /p>

Код: Выделить всё

private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.Service_MDMSSoap))
{
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;

return result;
}

if ((endpointConfiguration == EndpointConfiguration.Service_MDMSSoap12))
{
System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
result.Elements.Add(textBindingElement);
System.ServiceModel.Channels.HttpsTransportBindingElement httpsBindingElement = new System.ServiceModel.Channels.HttpsTransportBindingElement();
httpsBindingElement.AllowCookies = true;
httpsBindingElement.MaxBufferSize = int.MaxValue;
httpsBindingElement.MaxReceivedMessageSize = int.MaxValue;
result.Elements.Add(httpsBindingElement);
return result;
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
< /code>
Когда я звоню в службу, я получаю предупреждение, показанное выше. < /p>
Service_MDMSSoapClient sv1 = new Service_MDMSSoapClient(0);

ArrayOfXElement a = sv1.GET_READ_IX(tungay, denngay, username, pass);
Пожалуйста, помогите мне решить эту проблему

Подробнее здесь: https://stackoverflow.com/questions/756 ... with-autho
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «C#»