Anthony Sneed

I am running Vista and am going though the Windows SDK Hosting samples. I can get the NamedPipeActivation sample to work under WAS, but I keep getting this error with the TcpActivation sample:

"The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9589870'."

The inner exception states: "An existing connection was forcibly closed by the remote host."

I have successfully built the sample and run the AddNetTcpSiteBinding.cmd batch file. IIS 7 Manager shows a binding of type "net.tcp" with a host header "808:*". I am able to consume a self-hosted service that exposes an endpoint with netTcpBinding, but I'm unable to host the service under WAS on Vista.

Does anyone know what might be going on here



Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

RussellG

Do you have the "Net.Tcp Port Sharing Service" windows service running



Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

RussellG

Sorry, I meant to say the "Net.Tcp Listener Adapter" service...



Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

Anthony Sneed

Yes, both Net.Tcp Listener Adapter and Net.Tcp Port Sharing services are up and running (although the latter is set to Manual start).



Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

RussellG

I'm not familiar with the sample you mention. Try the steps in this example and see what you get:

http://www.iis.net/default.aspx tabid=2&subtabid=25&i=1190

Have you manually checked your IIS7 config (%windir%\system32\inetsrv\applicationHost.config) to see that net.tcp is enabled

Good info here: http://www.iis.net/default.aspx tabid=2&subtabid=25&i=1190&p=3

His tip on using "netstat -ano" to see that WAS is listening on the port might help you see what's going on.





Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

Anthony Sneed

I've been using the WASHost samples that come with the Windows SDK. I've also tried the sample you gave, but I am still getting the same exception: "An existing connection was forcibly closed by the remote host." I've also manually configured applicationHost.config, all to no avail.

When running netstat -ano (or TCPView), I can see that my machine is listening that the Adapter Service is listening on port 808. I've even tried using port 888 and still get the same results.

So I'm thinking there must be a problem with WAS and how it's configured, or perhaps a firewall issue But I don't have a problem self-hosting. I also enabled trace on the client, and I can see where the SocketConnection is aborted, but I am not able to see why that is happening. Any ideas on how to track this down





Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

Brian McNamara - MSFT

You're looking at http://msdn2.microsoft.com/en-us/library/ms752218.aspx, right

When you run the setup commands from the sample, namely

AddNetTcpSiteBinding.cmd

do you get any errors

I was just trying this on my own box; I noted that I had to change 'servicemodelsamples' from just a folder to an 'application' in IIS manager (by right-clicking on the folder and saying 'convert to application') to get this to work. Also, I can see in IIS Manager when I view the default web site that "808:* (net.tcp)" is listed in the right-hand pane under 'Browse web site', can you also see that






Re: Windows Communication Foundation (Indigo) Can't Get WAS Host Tcp Sample to Work

Khalid Aggag - MSFT

Are you running both the client and the service on the same machine or across multiple machines Are you sure the port 808 is opened via the firewall When you try to access the service using a web browser do you get the confirmation page