var client = new CommonClient()
XElement exceptionDates = XElement
.Parse(client.ExceptionDatesUpdateControl("status").OuterXml);
When calling:
client.ExceptionDatesUpdateControl("status")
The following error is thrown:
SecurityNegotiationException: A Call to SSPI Failed
What is the cause?
Additional information:
Web.config:
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="NetNamedPipeBinding_ICommon" />
</netNamedPipeBinding>
</bindings>
<client>
<endpoint address="net.pipe://localhost/service/common" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ICommon" contract="Service.Common.ICommon" name="NetNamedPipeBinding_ICommon">
</endpoint>
</client>
App.config:
<services>
<service name="PROJ.Service.CommonService" behaviorConfiguration="CommonServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="net.pipe://localhost/service/common"/>
</baseAddresses>
</host>
<endpoint
address="net.pipe://localhost/service/common"
binding="netNamedPipeBinding"
bindingConfiguration="pipeCommonServiceBinding"
contract="PROJ.Service.ICommon"
/>
This exception can happen in the following cases:
• While negotiating
the initial security context. The exact error depends on the
negotiation technology used: either Simple and Protected GSS-API
Negotiation (SPNEGO) or TLSNEGO. For more information, see Security
Protocols.
• While establishing a security session on top of an initial security
context.
• During key renewal for an existing security session.
Security negotiation errors can occur as part of the Spnego/Sslnego
security protocol or as part of the SecureConversation protocol.
source: MSDN
I found the answer.
When I looked deeper, there was another exception:
"Security.Authentication.AuthenticationException".
It disappeared when I commented these lines in my config file:
<!--identity>
<servicePrincipalName value="host/..." />
</identity-->
Related
I have a self-hosted C# WCF .Net 4.6.1 Windows service that communicates with another self-hosted WCF service. This works fine when both services are on the same server. However, when I move the server to another computer, I get this error:
System.ServiceModel.CommunicationException: 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. There are no firewalls running on either computer and I get a response when using http://192.168.1.129:6253/eTutorWcfService (using net.tcp in app).
Client app.config:
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IeTutorMessage" />
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IeTutorMessage" />
</netTcpBinding>
</bindings>
<client>
<endpoint name="BasicHttpBinding_IeTutorMessage"
address="http://localhost:6253/eTutorWcfService"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IeTutorMessage"
contract="eTutorServiceReference.IeTutorMessage" />
<endpoint name="NetTcpBinding_IeTutorMessage"
address="net.tcp://localhost:6254/eTutorWcfService"
binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IeTutorMessage"
contract="eTutorServiceReference.IeTutorMessage" >
<identity>
<servicePrincipalName value = ""/>
</identity>
</endpoint>
</client>
Server app.config:
<services>
<service name="eTutorServer.eTutorWcfService"
behaviorConfiguration="myeTutorServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:6253/eTutorWcfService"/>
<add baseAddress="net.tcp://localhost:6254/eTutorWcfService"/>
</baseAddresses>
</host>
<endpoint
address="http://localhost:6253/eTutorWcfService"
binding="basicHttpBinding"
contract="eTutorServer.IeTutorMessage" />
<endpoint
address="net.tcp://localhost:6254/eTutorWcfService"
binding="netTcpBinding"
contract="eTutorServer.IeTutorMessage" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
<endpoint
address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myeTutorServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
The client code:
EndpointAddress address = new EndpointAddress("net.tcp://" + eTutorServiceIp + ":6254/eTutorWcfService");
eTutorServiceReference.IeTutorMessageClient client = new eTutorServiceReference.IeTutorMessageClient("NetTcpBinding_IeTutorMessage", address);
try
{
rtn = client.eTutorMessage(itm);
client.Close();
}
When the client tries to connect, the output window of the server shows an SecurityTokenValidationException but I'm not sure what to do about that or if it means something relevant. I'm sure this has something to do with security but I don't know what to add where.
First, Nettcpbinding use transport security mode and authenticate the client with windows credential by default.
WCF throws exception that the server has rejected the client credentials, what is the default security mode for NetTCP in WCF
Then, when we change the server configuration and re-host the service, we should re-generate the client proxy class when we calling it. besides, we may need to change the endpoint address in the client configuration since Localhost is generated by default.
I can live with this but would really like to know how to do it
without security.
At last, when we change the security to None, the client does not need to provide the credentials to invoke the service. I suggest you re-host the service and re-generate the client proxy class. I have made a demo, wish it is useful to you.
Server end(console application)
class Program
{
static void Main(string[] args)
{
using (ServiceHost sh=new ServiceHost(typeof(MyService)))
{
sh.Opened += delegate
{
Console.WriteLine("Service is ready......");
};
sh.Closed += delegate
{
Console.WriteLine("Service is closed");
};
sh.Open();
Console.ReadLine();
sh.Close();
}
}
}
[ServiceContract]
public interface IService
{
[OperationContract]
string SayHello();
}
public class MyService : IService
{
public string SayHello()
{
return "Hello Stranger";
}
}
App.config
<system.serviceModel>
<services>
<service behaviorConfiguration="Service1Behavior" name="VM1.MyService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="mybinding" contract="VM1.IService" >
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:13007/"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="mybinding">
<security mode="None">
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="Service1Behavior">
<serviceMetadata />
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Client end.
ServiceReference1.ServiceClient client = new ServiceReference1.ServiceClient();
try
{
Console.WriteLine(client.SayHello());
}
catch (Exception)
{
throw;
}
App.config
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IService">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<client>
<!--we may need to change the generated endpoint address to autual server IP address.-->
<endpoint address="net.tcp://10.157.13.69:13007/" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IService" contract="ServiceReference1.IService"
name="NetTcpBinding_IService" />
</client>
</system.serviceModel>
Feel free to let me know if there is anything I can help with.
I added the following code and it works:
client.ClientCredentials.Windows.ClientCredential.UserName = runAs;
client.ClientCredentials.Windows.ClientCredential.Password = runAsPassword;
client.ClientCredentials.Windows.ClientCredential.Domain = runAsDomain;
However, I'd like to do this without security since it will be placed on multiple servers, none of which will have a public IP. I've tried to add to the bindings but on the client it's not a valid node and on the server, it stops the service from starting. I tried to add the following code to the server but it won't open the ServiceHost:
serviceHost.AddServiceEndpoint(typeof(eTutorWcfService), new NetTcpBinding(SecurityMode.None), "");
I can live with this but would really like to know how to do it without security.
i have an WCF Service where some commands can run insecure via HTTP, but as soon as payment is done, I need to switch to TLS 1.2.
I see there is no way to get this working, except to add reference to second service with another binding and addionally changing the namespaces.
Is there no other way where I can use the same service and just switch the binding?
I use .NET 4.6.1 in case there is a feature in newer versions...
thx!
You can define the host as having multiple bindings and endpoints and the client too. Something like this in pseudo code, you have to fill in your own settings.
<netTcpbinding>
<binding name="notsecure">
<security mode="None" />
</binding>
<binding name="secure">
<security mode="Transport" /> <!-- desired security settings -->
</binding>
</netTcpBinding>
<services>
<service name="yyy">
<endpoint binding="netTcpbinding" bindingConfiguration="notsecure" name="insecureEnd"
contract="IContract" />
<endpoint binding="netTcpBinding" bindingConfiguration="secure"
name="secureEnd" contract="IContract" />
<host>
<baseAddresses>
<add baseAddress="xxx" />
</baseAddresses>
</host>
</service>
</services>
Then config your client with the same multiple bindings and multiple endpoints.
And in code select the correct endpoint by name
Client secure = new Client("secure");
secure.Call();
Client notsecure = new Client("notsecure");
You can use the PrincipalPermission attribute to let certain functions only be called when they are authenticated with a specific certificate.
From MSDN:
https://msdn.microsoft.com/en-us/library/ms731200(v=vs.110).aspx
[PrincipalPermission(SecurityAction.Demand, Name = "CN=ReplaceWithSubjectName; 123456712345677E8E230FDE624F841B1CE9D41E")]
public double Multiply(double a, double b)
{
return a * b;
}
Is it possible to call a WCF service from a universal application?
I added a service reference and the proxy was generated just fine.
But when creating a NetTcpBinding programmatically and passing that to the proxy's constructor the service model throws the exception PlatformNotSupported.
Both running the app in the simulator and on the local machine generates the same exception.
An exception of type 'System.PlatformNotSupportedException' occurred
in System.Private.ServiceModel.dll but was not handled in user code
"this operation is not supported"
EndpointAddress address = new EndpointAddress("net.tcp://test:9000/ServicesHost/PublishService");
NetTcpBinding binding = new NetTcpBinding();
binding.Security.Mode = SecurityMode.None;
PublishingService.PublishClient proxy = new PublishingService.PublishClient(binding, address);
Does anybody have an example of a working WCF client in a UAP?
EDIT
It has something to do with the service being a duplex service!
The original contract:
[ServiceContract(CallbackContract = typeof(IPublishCallback))]
public interface IPublish { }
After removing the CallbackContract attribute the UAP client can create a connection, so basic WCF works.
So I guess it's better to rephrase the question.
Is it possible to create a duplex WCF client in a universal application?
edit servicemodel for the host
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcpPublishService" openTimeout="00:00:10" receiveTimeout="infinite">
<reliableSession inactivityTimeout="24.20:31:23.6470000" enabled="true" />
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="serviceBehaviour" name="PublishService.Publish">
<endpoint binding="mexHttpBinding" name="mexPublishService"
contract="IMetadataExchange" />
<endpoint address="PublishService" binding="netTcpBinding" bindingConfiguration="netTcpPublishService"
name="netTcpPublishService" contract="PublishService.IPublish" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8004/ServicesHost/PublishService" />
<add baseAddress="net.tcp://localhost:9004/ServicesHost/PublishService" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
Yes, it is possible. This is how i connect in a sample app i did a while ago:
using Tradeng.Srvc.Client.WinAppSimple.SrvcRefTradeng;
private InstanceContext instanceContext;
private TradengSrvcClientBase serviceProxy;
instanceContext = new InstanceContext(this);
serviceProxy = new TradengSrvcClientBase(instanceContext);
bool result = await serviceProxy.ConnectAsync();
if (result)
{
// connected...
}
I used the binding from the config file that is generated when you add a reference to your service.
This is what the app looks like. Cutting edge stuff.... :O)
https://www.youtube.com/watch?v=YSg6hZn1DpE
The service itself is running as a WebRole on Azure, by the way.
I want to set the maxReceivedMessageSize in the App.config of the WCF Client.
If the maxReceivedMessageSize equals or is smaller then 4215 it works fine. Though when setting it to 4216 or any value above it, the default value of 65536 is taken.
My Client Code
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IConexaApiServic" maxReceivedMessageSize="4216" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://svsr02.conexa.local/HelloService/ConexaApiService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IConexaApiServic"
contract="ConexaApiService.IConexaApiService" name="BasicHttpBinding_IConexaApiService" />
</client>
</system.serviceModel>
</configuration>
And The relavant Server Code
<basicHttpBinding>
<binding name="BasicHttpEndpoint_MPSAPIServic" maxReceivedMessageSize="2000000">
<security mode="TransportWithMessageCredential" />
</binding>
<binding name="BasicHttpEndpoint_HelloService" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2000000">
</binding>
</basicHttpBinding>
<service name="IIS_test123.HelloService">
<endpoint address="ConexaApi" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpoint_HelloService" contract="IIS_test123.IHelloService"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/API/ConexaApiService" />
</baseAddresses>
</host>
</service>
</services>
Any idea how to fix this?
This can be explainned. If you look at your exceptions:
System.ServiceModel.CommunicationException is an exception thrown from client side. It has the maxReceivedMessageSize from the client side. Everything is fine.
FaultException: this exception is a SOAP fault that propagate the exceptions from the service to the client application. ( http://www.codeproject.com/Articles/799258/WCF-Exception-FaultException-FaultContract). So this exception is actually coming from the service side! The maxReceivedMessageSize is the default value, and does not correspond to the maxReceivedMessageSize in your server configuration.
The address you are connecting to in your client is the service address, not configured maxReceivedMessageSize, and not the endpoint address ConexaApi which is configure with maxReceivedMessageSize="2000000". That' s why you are getting the default 65536.
And 4215 must be the size of your message if you consider that the exception does not raise if you increase it.
I have one application server implementing a bunch of services using default transferMode="Buffered" and one Streamed service. It exposes endpoints for basicHttp and net.tcp protocols, and runs in production under dozens of IIS 7.0+ configurations without incident.
When I went to replicate the architecture for a new application's server, streaming over net.tcp simply refused to work, throwing the perfectly opaque and obtuse ProtocolException
The .Net Framing mode being used is not supported by MyNetTcpEndpointAddress. See the server logs for more details.
Yeah right, the "server logs". (There's nothing, whether traced or not.) Service architectures and web.configs for S1 and S2 are identical, except for
some name changes
a custom namespace in S2 (S1 using tempuri)
different ports (S1 and S2 both using ports in the 8000-9000 range)
Streaming service S2 works just fine under basicHttp.
Having tried everything and failed to make the error go away, I built a test client that does nothing but run my service architecture with some Ping methods. No custom namespace, no frills, just the original configs, and lite services, contracts, and hand-coded wrappers around the ChannelFactory proxies.
Same error:
The .Net Framing mode being used is not supported by 'net.tcp://localhost:9931/StreamingService.svc'. See the server logs for more details.
The buffered test service works under both protocols, and the streamed service works under basicHttp, as in S2.
All testing done on the same Win7 machine with a complete IIS setup. The test app is still too big to post here, but here are the complete configs, and the console code
web.config
<configuration>
<connectionStrings>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<!-- throttling of stream size is partially controlled by this setting -->
<httpRuntime maxRequestLength="1048576" /><!-- 1GB -->
</system.web>
<system.serviceModel>
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress="FooService.svc" service="WcfTest.Services.FooService" />
<add relativeAddress="StreamingService.svc" service="WcfTest.Services.StreamingService" />
</serviceActivations>
</serviceHostingEnvironment>
<behaviors>
<serviceBehaviors>
<behavior>
<dataContractSerializer maxItemsInObjectGraph="200000" />
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding
openTimeout="00:20:00" sendTimeout="00:20:00" receiveTimeout="00:20:00" closeTimeout="00:20:00"
maxBufferSize="20000000" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000">
<readerQuotas maxStringContentLength="12000" />
</binding>
<binding name="WcfTest.Streaming.Http" transferMode="Streamed"
openTimeout="03:00:00" sendTimeout="03:00:00" receiveTimeout="03:00:00" closeTimeout="03:00:00"
maxReceivedMessageSize="1073741824" /><!-- 1GB -->
</basicHttpBinding>
<netTcpBinding>
<binding
openTimeout="00:20:00" sendTimeout="00:20:00" receiveTimeout="00:20:00" closeTimeout="00:20:00"
maxBufferSize="20000000" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000">
<readerQuotas maxStringContentLength="12000" />
</binding>
<binding name="WcfTest.Streaming.Tcp" transferMode="Streamed"
openTimeout="03:00:00" sendTimeout="03:00:00" receiveTimeout="03:00:00" closeTimeout="03:00:00"
maxReceivedMessageSize="1073741824"><!-- 1GB -->
</binding>
</netTcpBinding>
</bindings>
<protocolMapping>
<add scheme="http" binding="basicHttpBinding" />
<add scheme="net.tcp" binding="netTcpBinding"/>
</protocolMapping>
<services>
<service name="WcfTest.Services.Streaming">
<!-- http -->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="WcfTest.Streaming.Http" contract="WcfTest.Contracts.IStreamingService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<!-- net.tcp -->
<endpoint address="" binding="netTcpBinding" bindingConfiguration="WcfTest.Streaming.Tcp" contract="WcfTest.Contracts.IStreamingService" />
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
</configuration>
app.config
<configuration>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior>
<dataContractSerializer maxItemsInObjectGraph="200000"/>
</behavior>
<behavior name="customQuotaBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483646"/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding
openTimeout="00:20:00" sendTimeout="00:20:00" receiveTimeout="00:20:00" closeTimeout="00:20:00"
maxBufferSize="20000000" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000">
<readerQuotas maxStringContentLength="12000" />
</binding>
<binding name="WcfTest.Bindings.Streaming.Http" transferMode="Streamed"
openTimeout="03:00:00" sendTimeout="03:00:00" receiveTimeout="03:00:00" closeTimeout="03:00:00"
maxReceivedMessageSize="1073741824"><!-- 1GB -->
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding
openTimeout="00:20:00" sendTimeout="00:20:00" receiveTimeout="00:20:00" closeTimeout="00:20:00"
maxBufferSize="20000000" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000">
<readerQuotas maxStringContentLength="12000" />
</binding>
<binding name="WcfTest.Bindings.Streaming.Tcp" transferMode="Streamed"
openTimeout="03:00:00" sendTimeout="03:00:00" receiveTimeout="03:00:00" closeTimeout="03:00:00"
maxReceivedMessageSize="1073741824"><!-- 1GB -->
</binding>
</netTcpBinding>
</bindings>
<client>
<!-- Foo -->
<endpoint name="WcfTest.Endpoints.Foo.Http" address="http://localhost:9930/FooService.svc" binding="basicHttpBinding" contract="WcfTest.Contracts.IFooService" />
<endpoint name="WcfTest.Endpoints.Foo.Tcp" address="net.tcp://localhost:9931/FooService.svc" binding="netTcpBinding" contract="WcfTest.Contracts.IFooService" />
<!-- Streaming -->
<endpoint name="WcfTest.Endpoints.Streaming.Http" address="http://localhost:9930/StreamingService.svc" binding="basicHttpBinding" bindingConfiguration="WcfTest.Bindings.Streaming.Http" contract="WcfTest.Contracts.IStreamingService" />
<endpoint name="WcfTest.Endpoints.Streaming.Tcp" address="net.tcp://localhost:9931/StreamingService.svc" binding="netTcpBinding" bindingConfiguration="WcfTest.Bindings.Streaming.Tcp" contract="WcfTest.Contracts.IStreamingService" />
</client>
</system.serviceModel>
</configuration>
console test call
static void Main(string[] args)
{
Console.WriteLine("starting WcfTest client...");
Console.WriteLine();
PingFoo(Contracts.Enums.Protocol.Http);
PingFoo(Contracts.Enums.Protocol.Tcp);
Console.WriteLine();
PingStreaming(Contracts.Enums.Protocol.Http);
// only this call errors:
PingStreaming(Contracts.Enums.Protocol.Tcp);
Console.WriteLine();
Console.Write("ENTER to exit WcfTest client...");
Console.ReadLine();
}
private static bool PingFoo(Contracts.Enums.Protocol protocol)
{
FooProxy pxy = new FooProxy(protocol);
return PingProxy<IFooService>(pxy, protocol);
}
private static bool PingStreaming(Contracts.Enums.Protocol protocol)
{
StreamingProxy pxy = new StreamingProxy(protocol);
return PingProxy<IStreamingService>(pxy, protocol);
}
private static bool PingProxy<T>(ProxyServiceBase<T> pxy, Contracts.Enums.Protocol protocol) where T : IServiceBase
{
bool success = pxy.Ping();
Console.WriteLine("ping {0} {1}: {2}", pxy.GetType().Name, protocol, success ? " success" : " FAILED");
if (pxy != null)
pxy.Close();
return success;
}
Any ideas why this would be failing on one IIS site, under one of two protocols, and not on another? (It is not this.)
EDIT: In preparation for taking this bounty-side, a couple clarifications on this test service and client:
First, per commenter's suggestion, svcutil works fine against http, but fails against net.tcp. Here is the complete output of that run:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>svcutil
net.tcp://localhost:9931/StreamingService.svc Microsoft (R) Service
Model Metadata Tool [Microsoft (R) Windows (R) Communication
Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft
Corporation. All rights reserved.
Attempting to download metadata from
'net.tcp://localhost:9931/StreamingService.svc' using WS-Metadata
Exchange. This UR L does not support DISCO. Microsoft (R) Service
Model Metadata Tool [Microsoft (R) Windows (R) Communication
Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft
Corporation. All rights reserved.
Error: Cannot obtain Metadata from
net.tcp://localhost:9931/StreamingService.svc
If this is a Windows (R) Communication Foundation service to which you
have access, please check that you have enabled m etadata publishing
at the specified address. For help enabling metadata publishing,
please refer to the MSDN documentat ion at
http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error
URI: net.tcp://localhost:9931/StreamingService.svc
Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9931/StreamingService.svc'.
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout bei ng exceeded by
the remote host, or an underlying network resource issue. Local socket
timeout was '00:04:59.9929993'.
An existing connection was forcibly closed by the remote host
If you would like more help, type "svcutil /?"
Second, removing "transferMode="Streamed" from the Wcf.Bindings.Streaming.Tcp web and app configs pasted above allows the service to ping just fine. It does not improve the svcutil situation.
Finally, here are some other things I have tried, with no improvement:
Various versions of serviceMetadata attribute in serviceBehaviors (which I understand to be overridden by the existence of mex endpoints anyway)
Various named serviceBehaviors instead of the default I include
Various configurations of security mode= on the binding, especially None
Various disablings of all other bindings, endpoints, etc. in hopes that one thing might be getting in another's way
It seems that transferMode of tcp communication either at service side or client side to Streamed and the other side still uses the default mode which is Buffered.
Are you forgetting something in "StreamingProxy" in case of TCP?
May be this will help...
http://social.msdn.microsoft.com/Forums/vstudio/en-US/37e32166-63f3-4cb9-ab81-14caa50cd91e/help-with-error-message-the-net-framing-mode-being-used-is-not-supported-by-?forum=wcf
Also I am trying looking further for your solution...