I have problem with basic configuration of WCF. I am working on MobilePhone Application . First I created test desktop appliction which use basicHttpBinding and everything was fine.
Next I used the same code (Only difference is in ServerReference - In phone I used Two Server Files generated using NetCFSvcUtil). In Phone Application I am getting Endpoint no Found Exception.
Below I am putting my configuration. I would be grateful for help or suggestions.
Regards.
Exception on Phone side:
There was no endpoint listening at
http://localhost:4444/Service/PhoneService
that could accept the message. This is
often caused by an incorrect address
or SOAP action. See InnerException, if
present, for more details.
Phone Configuration:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:4444/Service/PhoneService/"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding"
contract="IPhoneService" name="BasicHttpBinding" />
</client>
</system.serviceModel>
** revelant fragment of Server Configuration**
<service name="Server.PhoneService" behaviorConfiguration="Server.PhoneServiceBehavior">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="" contract="Server.IPhoneService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:4444/Service/PhoneService" />
</baseAddresses>
</host>
</service>
//______________________________//
<behavior name="Server.PhoneServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
*Configuration in browser *
PhoneService Service
You have created a service.
To test this service, you will need to
create a client and use it to call the
service. You can do this using the
svcutil.exe tool from the command line
with the following syntax:
svcutil.exe
http://localhost:4444/Service/PhoneService?wsdl
This will generate a configuration
file and a code file that contains the
client class. Add the two files to
your client application and use the
generated client class to call the
Service. For example:
C#
class Test
{
static void Main()
{
PhoneServiceClient client = new PhoneServiceClient();
// Use the 'client' variable to call operations on the service.
// Always close the client.
client.Close();
}
}
The problem was caused by unavailable internet connection.
Related
I'm coding a webservice at the moment and the usage is as followed:
I got a frontend as dll, means I got a library project with a wpf window.
That library shall be called from other programs.
The Backend WCF-service is hosted on an external IIS and the frontend calls the webservice methods via a controller.dll where the wcf service is referenced.
I've read several post here and from google already about the same issue...but I can't get it fixed.
I got a dummy windows forms, which calls the frontend.dll.
That project got that app.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://Hidden-ip/TicketReportService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="ServiceReference.IService" name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
</configuration>
I'm aware, that each program that wants to call my frontend.dll would need to put the binding/endpoint configurations in their own app.config if I proceed like i described here.
Thats just an example though, later I'm doing the binding/endpoint config programaticallly in my controller.dll, so I dont need configuration files...but thats another topic.
If I call my method, that uploads the file via the webservice I got two scenarios:
if file > 16kb and <~30kb I get a protoccol exception, thats telling me that the "MaxArrayLength" (16384) was exceeded.
if I'm trying to upload a file with about 60kb I get a protocoll exception as well, but just with the information: "remoteserver returned unexpected answer.(400) bad request.
If you look in the app.config, the maxarray length is setted to int32.max value.
Also if I check the binding of the object that calls the method, its telling me that the maxarraylength was taken from the app.config....but I'm still getting the error message.
What did I wrong here?
Thats a client side issue, i'snt it?
In my service web.config on the IIS I got following:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="BackendService.Behavior" name="MyNamespaye.Service">
<endpoint address="" binding="basicHttpBinding" contract="MyNamespaye.IService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="BackendService.Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<connectionStrings>
<add name="CustomerEntities" connectionString="metadata=res://*/CustomerModel.csdl|res://*/CustomerModel.ssdl|res://*/CustomerModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=hidden-ip;User Id=root;database=fromcloud;password=hidden-pw;Persist Security Info=True"" providerName="System.Data.EntityClient" />
<add name="DocumentEntities" connectionString="metadata=res://*/DocumentModel.csdl|res://*/DocumentModel.ssdl|res://*/DocumentModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=hidden-ip;User Id=root;password=hidden-pw;Persist Security Info=True;database=fromcloud"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
...fixed it myself. Didn't know that it has to be configured on the service side as well!
new web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="BackendService.Behavior" name="MyNamespace.Service">
<host>
<baseAddresses>
<add baseAddress="http://localhost:1111/"/>
</baseAddresses>
</host>
<endpoint address="http://MyIP/TicketReportService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService"
contract="Mynamespace.BackendService.IService"
name="ticketReport_endpoint" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="BackendService.Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<connectionStrings>
<add name="CustomerEntities" connectionString="metadata=res://*/CustomerModel.csdl|res://*/CustomerModel.ssdl|res://*/CustomerModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=fwefwef;User Id=root;database=fromcloud;password=fwefw;Persist Security Info=True"" providerName="System.Data.EntityClient" />
<add name="DocumentEntities" connectionString="metadata=res://*/DocumentModel.csdl|res://*/DocumentModel.ssdl|res://*/DocumentModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=fwefwef;User Id=root;password=fwef;Persist Security Info=True;database=fromcloud"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
...just did another google search and found a proper exampel of a web.config.
Thanks anyway for anyone that read the OP.
I worked through building a WCF duplex service on my development machine. I built the service, created a test client, tested everything and it works. . Then I got gutsy and moved it to my production server.Now that I've moved to the production server I can't use the duplex service. block for sometime and give timeout error
Service web.config
<?XML version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true" target Framework="4.0">
</compilation>
<authentication mode="Windows"/>
<pages compatibility="3.5" client ID Mode="Auto ID"/>
</system.web>
<system.serviceModel>
<services>
<service name="WCFDuplex.Service1" behaviorConfiguration="WCFDuplex.Service1Behavior">
<endpoint address="http://Productionserver:8088/sampleWCF/Service1.svc" binding="wsDualHttpBinding" contract="WCFDuplex.IServiceDuplex">
<identity>
<dns value="Productionserver"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFDuplex.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Client app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_IServiceDuplex" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" >
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:01:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default"/>
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://Productionserver:8088/sampleWCF/Service1.svc" binding="wsDualHttpBinding"
bindingConfiguration="WSDualHttpBinding_IServiceDuplex" contract="IServiceDuplex"
name="WSDualHttpBinding_IServiceDuplex">
<identity>
<dns value="Productionserver" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
Client code:
static void Main(string[] args)
{
EndpointAddress endPointAddress = new EndpointAddress("http://ProductionServer:8088/sampleWCF/Service1.svc");
try
{
InstanceContext instanceContext = new InstanceContext(new CallbackHandler());
ServiceDuplexClient client = new
ServiceDuplexClient(instanceContext, new WSDualHttpBinding(), endPointAddress);
client.ClientCredentials.UserName.UserName = "bipin";
client.ClientCredentials.UserName.Password = "pass#123";
client.Open();
client.GetDataFromXml();
}
catch (Exception ex)
{
Console.WriteLine(string.Format("Error connecting to service. {0}", ex.Message));
}
Console.ReadLine();
}
I getting error when open proxy : i.e client.Open();
Client is unable to finish the security negotiation within the configured timeout (00:00:00). The current negotiation leg is 1 (00:00:00). Source=mscorlib
Please help me to sort out this error. any help will be appreciable. thanks.
My advice is not to use WSDualHttpBinding for Duplex - the whole model it uses is very prone to failure and doesn't work through any robustly configured firewall
Switch to NetTcpBinding for duplex. The client creates an outbound connection to the server and then this same connection is used to pass the duplex messages (WSDualHttpBinding tries to establish another connection from server to client which is will almost certainly be blocked in production networks
I blogged about this here
I am creating a WCF Service. It is my first one. I am receiving the error:
Could not find default endpoint
element that references contract
'WCFClient.IWCFClient' in the
ServiceModel client configuration
section.
I have tried switching around endpoint names and such, and deleting/recreating the service reference. I can't seem to figure out what the problem is.
Application Config:
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWCFClient" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:4295/Services/WCFClient.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWCFClient"
contract="WCFClient.IWCFClient" name="BasicHttpBinding_IWCFClient" />
</client>
Service Config:
<services>
<service behaviorConfiguration="WCFGraphicManagementTool.Services.WCFClientBehavior"
name="WCFGraphicManagementTool.Services.WCFClient">
<endpoint address="" name="BasicHttpBinding_IWCFClient" binding="basicHttpBinding" contract="WCFGraphicManagementTool.Contracts.IWCFClient">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFGraphicManagementTool.Services.WCFClientBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceThrottling maxConcurrentCalls="120" maxConcurrentSessions="120" maxConcurrentInstances="120" />
<serviceMetadata httpGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
I just figured it out. I needed to add it to the project's web.config also. It was in the service's, but not the project.
This is normally due to a mismatch between the service name/namespace that is specified in the config file and either the contract name on the source code or markup of the service file. Normally happens after you create a new service via Visual Studio and then rename the service/namespace.
Right-click on the .svc file in the solution explorer and select 'View Markup'
Check if the 'Service' attribute value is correct. Check if both namespace and name match the ones you have assigned.
Should be something like this:
<%# ServiceHost Language="C#" Debug="true" Service="WCFGraphicManagementTool.Services.WCFClient" CodeBehind="WCFClient.svc.cs" %>
I am trying to consume an ASMX web service from my WCF service. Here is what I did and i get the following error.
"There was no endpoint listening at "http://... " that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Please help me. Where I am doing wrong? What I am missing?
I created a WCF Service Library and added a reference to the ASMX web service with the help of the WSDL file provided to me.
namespace WCFClueClient
{
public class Service1 : IService1
{
public string GetData(string value)
{
ClueClientServiceReference.InteractiveOrderHandlerClient client = new WCFClueClient.ClueClientServiceReference.InteractiveOrderHandlerClient();
string response = client.handleInteractiveOrder(value);
return string.Format("You entered: {0}", response);
}
}
I have a console application which has refernce to my WCF service
namespace CLUE
{
class Program
{
static void Main(string[] args)
{
CLUETestServiceReference.Service1Client client = new CLUE.CLUETestServiceReference.Service1Client();
string response = client.GetData("JOHN DOE");
}
}
}
my app.config file
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="InteractiveOrderHandlerBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="WSHttpBinding_IService1" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://alalppnc079.choicepoint.net:8280/CPRules-rfCommunicationEJB/InteractiveOrderHandlerURI"
binding="basicHttpBinding" bindingConfiguration="InteractiveOrderHandlerBinding"
contract="ClueClientServiceReference.InteractiveOrderHandler"
name="InteractiveOrderHandlerPort" />
<endpoint address="http://localhost:8731/Design_Time_Addresses/WCFClueClient/Service1/"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
contract="WCFCLUETEstServiceReference.IService1" name="WSHttpBinding_IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
<services>
<service name="WCFClueClient.Service1" behaviorConfiguration="WCFClueClient.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/WCFClueClient/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="wsHttpBinding" contract="WCFClueClient.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFClueClient.Service1Behavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
Hey, in this post there is a cool explanation of that problem:Stackoverflow post
And if you don't get the trouble ... just press F5 on your solution and standup the website ... then go to your console app build file (inside debug folder) and execute the .exe.
It seems that you are trying to work with your webservice host and client at the same debugger.
Hope it helps!
I have a WCF service hosted in IIS7.
This is the app.config for my service hosted in IIS
<system.serviceModel>
<bindings />
<services>
<service behaviorConfiguration="querierSearch.Querier.WCF.QuerierBehavior"
name="querierSearch.Querier.WCF.Querier">
<endpoint
address="net.tcp://localhost:808/querierSearch.Querier.WCF/Querier.svc"
binding="netTcpBinding" bindingConfiguration="" name="EndPointTCP"
contract="querierSearch.Querier.WCF.IQuerier" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="querierSearch.Querier.WCF.QuerierBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
And below is the app.config in the client that references the WCF Service.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="EndPointTCP" closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10"
maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
axArrayLength="16384" maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows"
protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://localhost/Search.Querier.WCF/Querier.svc"
binding="netTcpBinding" bindingConfiguration="EndPointTCP"
contract="SearchQueryService.IQuerier"
name="EndPointTCP">
<identity>
<userPrincipalName value="joeuser#company.com" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
For some reason I still get "The provided URI scheme 'http' is invalid; expected 'net.tcp'." exception .
I cannot figure out why.....
Actually it turns out i was missing the mex endpoint...
woops
Possibly this
<serviceMetadata httpGetEnabled="true" />
You're asking it to enable HTTP on a TCP service, which seems like it might cause some problems.
My issue is that the behaviorConfiguration in the web.config is deleted after I refresh the the Service References.
(My behaviorConfiguration uses a clientVia address rather than a standard endpoint address to allow it to traverse the firewall).