At server I have web.config to my application:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
</appSettings>
<connectionStrings>
</connectionStrings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097152000" maxBufferPoolSize="524288000" maxReceivedMessageSize="2097152000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="524288000"
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="Server.FileServer.Service" behaviorConfiguration="Server.FileServer.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://192.168.1.217/FileServer/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" contract="Server.FileServer.IService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService">
<!--
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="Server.FileServer.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="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.web>
<compilation debug="true" />
<httpRuntime maxRequestLength="2097151" executionTimeout="1000" />
<customErrors mode="RemoteOnly" />
</system.web>
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>
But when I check it by wcf test client I have:
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: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://SOMEADRESS.pl/FileServer/Server.FileServer.Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="IService" name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
</configuration>
As you can see parameters of binding are not the same
Any ideas ?
Binding parameters such as the buffer size do not automatically propagate from server to client when you create a service reference. You will have to adjust hem manually on the client side as well.
Was that the question? It's a little unclear to me what the problem is exactly.
I think Thorarin is right, some information can't be propagated to client from server.
Checkout here http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/dde72fbe-e741-48fd-a9e1-253800d5227a
Related
I pass some values to my WCF service from the .net application in string format. Passing string format will be in this structure,
ItemName~ItemDescription~ItemPrice|ItemName~ItemDescription~ItemPrice|...
Every line item will be separated by '|' character. I was passing nearly 1000 items. It was working as expected, but when I came to pass 1500 items, this error occurs.
The remote server returned an unexpected response: (413) Request Entity Too Large.
Please help me in fixing this error.
This is the method in service
private void InsertGpLineItems(string lineItems)
{
//Here I will process the insertion of line items to the GP system.
}
This is web.config at my WCF service.
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="connectionString" value="data source=localhost; initial catalog=TWO; integrated security=SSPI"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<pages validateRequest="false" />
<httpRuntime requestValidationMode="2.0" />
</system.web>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging"
switchValue="Information, ActivityTracing, Error">
<listeners>
<add name="messages"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="messages.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="3000"
maxSizeOfMessageToLog="2000"/>
</diagnostics>
<services>
<service name="Service1.IService1">
<endpoint address="" binding="basicHttpBinding"
contract="Service1.IService1">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:50935/Service1.svc"/>
</baseAddresses>
</host>
<!--<endpoint address="http://localhost:50935/Service1.svc" binding="basicHttpBinding"></endpoint>-->
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="SampleBinding"
messageEncoding="Text"
closeTimeout="00:02:00"
openTimeout="00:02:00"
receiveTimeout="00:20:00"
sendTimeout="00:02:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2000000"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="">
</transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 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>
<endpointBehaviors>
<behavior name="behaviorGPLineItemsService">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Try this,
<bindings>
<basicHttpBinding>
<binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
Instead of these lines in your code,
<bindings>
<basicHttpBinding>
<binding name="SampleBinding"
messageEncoding="Text"
closeTimeout="00:02:00"
openTimeout="00:02:00"
receiveTimeout="00:20:00"
sendTimeout="00:02:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2000000"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="">
</transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
I hope this helps you. :)
One reason it may not be working is that you've defined binding is not being used by your endpoint because you don't specify it via the bindingConfiguration attribute in the endpoint element. This results in WCF using the default values for basicHttpBinding (which are lower), rather than your values.
Try this:
<service name="Service1.IService1">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="SampleBinding"
contract="Service1.IService1">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:50935/Service1.svc"/>
</baseAddresses>
</host>
<!--<endpoint address="http://localhost:50935/Service1.svc" binding="basicHttpBinding"></endpoint>-->
</service>
Note the use of the bindingConfiguration attribute in the sample above.
Also note that if you're hosting the service in IIS, you don't need the baseAddress element, as the base address will be the location of the .svc file.
ADDED
The same principle applies to your endpoint behavior - its not being assigned to the endpoint either - you need to use the behaviorConfiguration attribute for this:
<service name="Service1.IService1">
<endpoint address=""
behaviorConfiguration="behaviorGPLineItemsService"
binding="basicHttpBinding"
bindingConfiguration="SampleBinding"
contract="Service1.IService" />
The service behavior configuration section doesn't have a name attribute specified, so it is treated as the default service behavior and is applied to all services (in that config file) that do not explicitly set a behaviorConfiguration name.
The blank name = default applies to binding configurations and endpoint behavior configurations as well, IIRC.
This is because your service is of type HTTP GET which is limited length.
If your data sent is really large, then you must use HTTP POST instead.
[WebInvoke(Method = "POST")]
private void InsertGpLineItems(string lineItems)
Also, you need to edit you web.config file, as you can find here.
I tried to find some solution on my own, but I failed. I have WCF web service hosted under virtual directory in IIS
http://host/soap/myservice.svc
Soap services are placed under REST services
http://host - REST services address
When I am trying to execute methods from the WCF service I get this error (on server side):
Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found.
When I host the WCF service on the same IIS, but as an standalone application
http://host:81
everything works fine. But I need them to be under those REST services.
Here is client web.config generated by svcutil:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IMyService" 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://host/soapservices/MyService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"
contract="IMyService" name="WSHttpBinding_IMyService">
<identity>
<servicePrincipalName value="host/host" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
Here is web.config of soap service:
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="MyServiceName">
<host>
<baseAddresses>
<add baseAddress="http://host/SOAPServices/MyService/" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" contract="IMyService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>
I have a C# WCF service and a C# console application and wish to pass a large file from the application to the WCF. When I pass the string, I get protocolexception, max string content length quota exceeded (8192) which is correct. I change the MaxStringContentLength on ReaderQuotas in the Apps.Config to a large amount but nothing happens, it still errors. Does anyone know why? Do I need to add something to the web.config. The contents of my files are below :-
Web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 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>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
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: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="88192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="largeStrings" openTimeout="00:02:00" sendTimeout="00:02:00"
maxBufferSize="524288" maxReceivedMessageSize="524288">
<readerQuotas maxDepth="10" maxStringContentLength="524288" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:2745/ActuristDemo/Service.svc"
binding="basicHttpBinding" bindingConfiguration="largeStrings"
contract="ActuristWS.IService" name="largeStrings" />
</client>
</system.serviceModel>
</configuration>
http://social.msdn.microsoft.com/Forums/eu/wcf/thread/77097d1f-372a-4c7d-910f-57c9ecd9c5c1
Gave me exactly what I wanted.
When you're sending the large string from the client to the service, you need to increase the limits in the service configuration (i.e. web.config). Example:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="customHttpBinding" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" />
<binding name="BasicHttpBinding_IMyWebService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MyService.MyWcfService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyWebService"
contract="MyService.IMyWebService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/MyService/MyWcfService/" />
</baseAddresses>
</host>
</service>
</services>
I am trying to setup a simple WCF web service with wsHTTPBinding and using a custom Username.
I have the service on a remote server setup with a self signed cert on a different port.
eg: https://service.myserice.com:442/service1.svc
For some reason the client seems to default to windows security even though I hjave set it up as UserName Security.
Here is my web Service config file:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"></customErrors>
</system.web>
<system.serviceModel>
<services>
<service name="AutoSenderWCF.Service1" behaviorConfiguration="Behavior1">
<host>
<baseAddresses>
<add baseAddress="https://service.autosender.com.au:442/" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" bindingName="TransportBinding" contract="AutoSenderWCF.IService1"></endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="TransportBinding">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="Behavior1">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="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="true"/>
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="AutoSenderWCF.CustomValidator, AutoSenderWCF"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
and my client code (notic ethe security=windows)
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="TransportBinding_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" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://service.autosender.com.au/Service1.svc"
binding="wsHttpBinding" bindingConfiguration="TransportBinding_IService1"
contract="ServiceReference1.IService1" name="TransportBinding_IService1">
<identity>
<servicePrincipalName value="host/wserver" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
It is clearly specified to use Windows in your Client config:
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
Copy that section from Server config.
I beleive i have solved it:
this line.
<endpoint address="" binding="wsHttpBinding" bindingName="TransportBinding" contract="AutoSenderWCF.IService1"></endpoint>
it should not be bindingName it should be bindingConfiguration
I have a WCF Service with only the xml configuration file and the .exe (so not the complete solution). Can i make existing endpoints secure with https?
If so, how can i do this and how can i connect to it with my client which will be on another pc in the network?
this will be my service xml config:
my binding:
<wsHttpBinding>
<binding
name="HighQuotaWSHttpBinding"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
bypassProxyOnLocal="true"
maxBufferPoolSize="2147483647"
useDefaultWebProxy="false"
maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
my endpoint:
<service
behaviorConfiguration="WebDataServiceBehaviour"
name="Humiq.Integral.WebDataService.Impl.ServiceLayer.WcfLibrary.WebDataService">
<endpoint
address="WebDataService"
binding="wsHttpBinding" bindingConfiguration="HighQuotaWSHttpBinding"
contract="Humiq.Integral.WebDataService.Intf.ServiceLayer.IWebDataService"
name="WebDataServiceHttpBinding">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint
address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange"
name="mexManagement" />
<host>
<baseAddresses>
<add baseAddress="http://mylocalip:9650/" />
<add baseAddress="https://mylocalip:9651/" />
</baseAddresses>
</host>
</service>
behaviour:
<behaviors>
<serviceBehaviors>
<!-- Behavior for WebserviceData interface -->
<behavior name="WebDataServiceBehaviour">
<!-- Set throttling of (concurrent) cals -->
<serviceThrottling
maxConcurrentCalls="100"
maxConcurrentSessions="100"
maxConcurrentInstances="100"/>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="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="True" />
<dataContractSerializer maxItemsInObjectGraph="2147483646"/>
</behavior>
</serviceBehaviors>
</behaviors>
And this is my client:
<bindings>
<wsHttpBinding>
<binding name="WebDataServiceHttpBinding" 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="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://mylocalip:9651/WebDataService" binding="wsHttpBinding"
bindingConfiguration="WebDataServiceHttpBinding" contract="wcf1.IWebDataService"
name="WebDataServiceHttpBinding">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
you need to define the port to use ssl on windows.
it is done with the netsh command, you can read its help:
netsh http add sslcert ipport=0.0.0.0:8732 certhash=4745537760840034c3dea27f940a269b7d470114 appid={00112233-4455-6677-8899-AABBCCDDEEFF}