WCF Service call working with basicHttpBinding but fails with netTcpBinding

(Please read comment as i have a fix)
Hi,

I have created a WCF Service that i am hosting in IIS 7.5 on Windows 7 using .net 4.0
The service is hosted both on http and net.tcp.

I have tested my service using the WcfTestClient and it seems to work correctly through both basicHttp and netTcp.

However, when i try consume this service through my ASP.NET Website, i receive an error when trying to go through nettcp

My client end point looks as follows



  
    
      
      
    
  
  
    
      
      
    
  


  
  

Now i call the service in the exact same way just swapping my end point name

var factory = new ChannelFactory(SuppliedEndpointName);
factory.Open();
var proxy = factory.CreateChannel();
var result = proxy.SomeServiceMethod();

If i pass this method the basicHttpBinding it works perfectly.
При втором переключении на nettcp я сразу получаю эту ошибку:

Исключение: соединение сокета было прервано. Это может быть вызвано ошибкой обработки вашего сообщения, превышением времени ожидания приема удаленным узлом или проблемой базового сетевого ресурса. Тайм-аут локального сокета был «00: 01: 00».

Внутреннее исключение: существующее соединение было принудительно закрыто удаленным хостом

Код ошибки: 10054

Пожалуйста, помогите мне, это сводит меня с ума.

11129793] Я определенно установил функции активации WCF HTTP и НЕ HTTP.
Я настроил привязку как HTTP, так и net.tcp на разных портах.
Я установил для своих включенных протоколов http, net.tcp в IIS.
Я отключил брандмауэр. I have run aspnet_regiis -i for .net 4.0

HELP!


I finally found that changing my security mode to transport fixes the problem.
However my service has it security mode set to none.
So why does my client only works with security mode transport on?

5
задан WebDude 14 April 2011 в 21:46
поделиться