Hi i am trying to enable my wcf serive to run on https but i am getting this error
Configuration binding extension 'system.serviceModel/bindings/true' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly.
Can any one let me know where i am going wrong.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation debug="true" />
<authentication mode="None"/>
<httpRuntime maxRequestLength="2097151" />
<hostingEnvironment shadowCopyBinAssemblies="false"/>
<pages compilationMode="Never"/>
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service name="MyWebApp.Medical.WebViewer.Wcf.StoreService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IStoreService" behaviorConfiguration="WebViewerServiceBehavior" bindingConfiguration="HandleLargeData"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.PatientService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IPatientService" behaviorConfiguration="WebViewerServiceBehavior" bindingConfiguration="HandleLargeData"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.ObjectQueryService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IObjectQueryService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration="" contract="IMetadataExchange">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.ObjectRetrieveService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IObjectRetrieveService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.PacsQueryService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IPACSQueryService" behaviorConfiguration="WebViewerServiceBehavior">
</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="mexHttpsBinding" contract="IMetadataExchange" />
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.PACSRetrieveService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IPACSRetrieveService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.AuthenticationService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IAuthenticationService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.PatientAccessRightsService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IPatientAccessRightsService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.AnnotationsService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IAnnotationsService" behaviorConfiguration="WebViewerServiceBehavior" bindingConfiguration="HandleLargeData">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.OptionsService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IOptionsService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.AuditLogService" behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyWebApp.Medical.WebViewer.ServiceContracts.IAuditLogService" behaviorConfiguration="WebViewerServiceBehavior">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.ExportService"
behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address=""
binding="webHttpBinding"
contract="MyWebApp.Medical.WebViewer.ServiceContracts.IExportService"
behaviorConfiguration="WebViewerServiceBehavior"
bindingConfiguration="HandleLargeData">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.MonitorCalibrationService"
behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address=""
binding="webHttpBinding"
contract="MyWebApp.Medical.WebViewer.ServiceContracts.IMonitorCalibrationService"
behaviorConfiguration="WebViewerServiceBehavior"
bindingConfiguration="HandleLargeData">
</endpoint>
</service>
<service name="MyWebApp.Medical.WebViewer.Wcf.WorklistService"
behaviorConfiguration="WebViewerServiceBehavior">
<endpoint address=""
binding="webHttpBinding"
contract="MyWebApp.Medical.WebViewer.ServiceContracts.IWorklistService"
behaviorConfiguration="WebViewerServiceBehavior"
bindingConfiguration="HandleLargeData">
</endpoint>
</service>
</services>
<extensions>
<bindingExtensions>
<add name="basic" type="basicHttpBinding"/>
<add name="webBind" type="webHttpBinding"/>
<add name="ws*bind" type="wsHttpBinding"/>
</bindingExtensions>
<behaviorExtensions>
<add name="jsonWebHttp" type="MyWebApp.Dicom.Services.ErrorHandler.JsonErrorWebHttpBehaviorElement, MyWebApp.Medical.WebViewer.WCF" />
<add name="CorsSupport" type="MyWebApp.Wcf.CorsSupportBehaviorElement, MyWebApp.Wcf.WebHttpCorsBehavior" />
</behaviorExtensions>
</extensions>
<bindings>
<webHttpBinding>
<binding name="HandleLargeData" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" receiveTimeout="01:00:00" openTimeout="01:00:00" closeTimeout="01:00:00" sendTimeout="01:00:00">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="WebViewerServiceBehavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<!--<serviceMetadata httpGetEnabled="true" httpGetUrl="anonymous" />-->
<serviceMetadata httpsGetBinding="true" httpsGetUrl="anonymous" />
<!-- 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>
<endpointBehaviors>
<behavior name="WebViewerServiceBehavior">
<webHttp />
<jsonWebHttp />
<CorsSupport />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
<connectionStrings>
</connectionStrings>
<appSettings>
</appSettings>
<system.webServer>
<staticContent>
<remove fileExtension=".dcz"/>
<mimeMap fileExtension=".dcz" mimeType="application/x-zip-compressed" />
</staticContent>
</system.webServer>
</configuration>
Looks like you have set httpsGetBinding to a binding that is not defined.
Try changing this:
<serviceMetadata httpsGetBinding="true" httpsGetUrl="anonymous" />
to this:
<serviceMetadata httpsGetEnabled="true" />
Also you have provided a name to the binding - 'HandleLargeData'. Only the services that have explicitly set this in the bindingConfiguration property will use it. Perhaps this is what you want but just something to be aware of.
Related
Ok. So I don't know what I am doing wrong, but I have tried a few things. There's even a few posts here about this very same problem, but seems like I just cannot get this right.
I have a website that is running rest services, and everything is working fine when I use normal "http".
So today I was like "...hey, let's enable SSL, because we will have to run the website with SSL anyways later on...", and this is what I did:
- Clicked on the project, and pressed F4 (open properties) and ->
Great. When I run the wesbite:
And this is what my serviceModel looks like:
<system.serviceModel>
<!--<services>
<service name="Stolen.Service">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="secureHttpBinding"
contract="Stolen.IService"/>
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />
</service>
</services>-->
<bindings>
<basicHttpBinding>
<binding name="secureHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding>
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="Stolen.Service">
<endpoint address="rest"
binding="basicHttpBinding"
bindingConfiguration="secureHttpBinding"
behaviorConfiguration="RestfulBehavior"
contract="Stolen.IService"/>
<!--<endpoint address=""
binding="webHttpBinding"
behaviorConfiguration="RestfulBehavior"
contract="Stolen.IService"/>-->
<!--<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />-->
<!--<endpoint address="soap"
binding="basicHttpBinding"
behaviorConfiguration="SOAPBehavior"
contract="Stolen.IService" />-->
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="RestfulBehavior">
<!--<enableWebScript/>-->
<webHttp/>
</behavior>
<!--<behavior name="SOAPBehavior">
</behavior>-->
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
And one of the services that I have:
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "IncrementWebsiteVisitCount",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string IncrementWebsiteVisitCount();
Some posts have suggested that the
<webHttp/>
be removed. Some also suggested that this is because I have configured a single endpointBehavior for both SOAP and REST endpoints. I dunno, this one gets me!
Can anyone perhaps help me out? Any help will be appreciated!
I actually ended up changing a few things.
But only in the web config file.
My serviceModel now looks like this:
<system.serviceModel>
<bindings>
<!-- As far as I know, webHttpBinding means it is a REST service -->
<webHttpBinding>
<binding name="secureHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<!-- 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"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="Stolen.Service">
<host>
<baseAddresses>
<add baseAddress="https://localhost:44300/Service.svc/" />
</baseAddresses>
</host>
<endpoint address=""
behaviorConfiguration="web"
binding="webHttpBinding"
bindingConfiguration="secureHttpBinding"
contract="Stolen.IService" />
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
With this, everything is working fine for me now, with SSL.
I have a WCF service hosted on IIS and here is the web config.
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="false" />
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IFactoryData" allowCookies="true" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000" />
<binding name="BasicHttpBinding_IWatheq">
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IFactoryData" />
</netTcpBinding>
<wsHttpBinding>
<binding name="allowMax" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="200" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://eind.mci.gov.sa/FactoryWCF/FactoryData.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IFactoryData" contract="MCI_FactoryData.IFactoryData" name="BasicHttpBinding_IFactoryData" />
<endpoint address="https://wathiqprep.thiqah.sa/2.0/Wathiq.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWatheq" contract="WatheqServiceRef.IWatheq" name="BasicHttpBinding_IWatheq" />
<!--<endpoint address="net.tcp://mci-inddb.mci.gov/FactoryWCF/FactoryData.svc"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IFactoryData"
contract="MCI_FactoryData.IFactoryData" name="NetTcpBinding_IFactoryData">
<identity>
<servicePrincipalName value="host/MCI-INDDB.MCI.GOV" />
</identity>
</endpoint>-->
</client>
<behaviors>
<endpointBehaviors>
<behavior name="Web" />
</endpointBehaviors>
<serviceBehaviors>
<behavior name="mex">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="mex" name="SIDFService.FactoryService">
<endpoint behaviorConfiguration="Web" binding="wsHttpBinding" bindingConfiguration="allowMax" contract="SIDFService.IFactoryService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="mex" name="SIDFService.WatheqService">
<endpoint behaviorConfiguration="Web" binding="wsHttpBinding" bindingConfiguration="allowMax" contract="SIDFService.IWatheqService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="mex" name="SIDFService.TempIndustrialLicenseService">
<endpoint behaviorConfiguration="Web" binding="wsHttpBinding" bindingConfiguration="allowMax" contract="SIDFService.ITempIndustrialLicenseService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="mex" name="SIDFService.SaudiPostAddressService">
<endpoint behaviorConfiguration="Web" binding="wsHttpBinding" bindingConfiguration="allowMax" contract="SIDFService.ISaudiPostAddressService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
The setting on IIS is anonymous is enabled and Windows is enabled ... the service wsdl is accessble outside the domain but on WCF test client it is asking for windows credentials. The same when windows is disabled on IIS authentication, the service gives error on browser outside domain.
Is it possible to have more than one Wcf service class . Because I have two contract interface and want to implement in two different service classes. Is it possible?
If you have 2 contracts say IService1 and IService2, you have two options :
both 2 service contracts are implemented by one service which implement all méthod from IService1 and IServe2. Then your configuration file will look like :
<services>
<service name="MyNamespace.Service">
<host>
<baseAddresses>
<add baseAddress="http:localhost:8080" />
</baseAddresses>
</host>
<endpoint address="Service1" binding="basicHttpBinding" contract="MyNameSpace.IService1" />
<endpoint address="Service2" binding="basicHttpBinding" contract="MyNameSpace.IService2" />
</service>
</services>
each contract is implemented by separate service let's say Service1 and Service2 then your configuration will look like :
<services>
<service name="MyNamespace.Service1">
<host>
<baseAddresses>
<add baseAddress="http:localhost:8081" />
</baseAddresses>
</host>
<endpoint address="Service1" binding="basicHttpBinding" contract="MyNameSpace.IService1" />
</service>
<service name="MyNamespace.Service2">
<host>
<baseAddresses>
<add baseAddress="http:localhost:8082" />
</baseAddresses>
</host>
<endpoint address="Service2" binding="basicHttpBinding" contract="MyNameSpace.IService2" />
</service>
</services>
Yes, but exposing those service is a different thing, you can't expose two contracts on a Single address(except if you wrap them in one single interface, not recommended). You need to give different endpoints to the two service contract in your web.config. Forexample,
<services>
<service name="TwoContracts.Service1">
<endpoint address="" binding="basicHttpBinding" contract="TwoContracts.IService1">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://yoururl.com/TwoContracts/Service1" />
</baseAddresses>
</host>
</service>
<service name="TwoContracts.Service2">
<host>
<baseAddresses>
<add baseAddress="http://yoururl.com/TwoContracts/Service2" />
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding"
contract="TwoContracts.IService2" />
</service>
</services>
Hi,
I'm trying to send custom data to WCF web site from a client application. It doesn't work when I try to send probably large amount of data.
The instruction that fails is:
roleCliente.SaveStructure(role, ref s);
"role" contains a list of custom objects; the instruction works correctly when the list is enough short.
The server side web.config is:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime maxQueryStringLength="2097151"/>
</system.web>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="All">
<listeners>
<add name="xmlTraceListener" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="All">
<listeners>
<add name="xmlTraceListener" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xmlTraceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="ClientLogBasic.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
<system.serviceModel>
<diagnostics>
<messageLogging maxMessagesToLog="10000" logEntireMessage="true" logMessagesAtServiceLevel="true" logMalformedMessages="true" logMessagesAtTransportLevel="true">
<filters>
<clear/>
</filters>
</messageLogging>
</diagnostics>
<behaviors>
<endpointBehaviors>
<behavior name="EndPointBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="CustomBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFAgency">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFAgency" contract="ServiceReference1.IWCFAgency" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFCompetence">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFCompetence" contract="ServiceReference1.IWCFCompetence" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFCompetenceScheme">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFCompetenceScheme"
contract="ServiceReference1.IWCFCompetenceScheme" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFPerson">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFPerson" contract="ServiceReference1.IWCFCompetenceScheme" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFCertificate">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFCertificate" contract="ServiceReference1.IWCFCertificate" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFAttitude">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFAttitude" contract="ServiceReference1.IWCFAttitude" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFClassificationType">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFClassificationType"
contract="ServiceReference1.IWCFClassificationType" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFCompetenceDetail">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFCompetenceDetail"
contract="ServiceReference1.IWCFCompetenceDetail" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFCompetencyDetail">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFCompetencyDetail"
contract="ServiceReference1.IWCFCompetencyDetail" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFCompetencyScheme">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFCompetencyScheme"
contract="ServiceReference1.IWCFCompetencyScheme" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFContext">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFContext" contract="ServiceReference1.IWCFContext" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFEducation">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFEducation" contract="ServiceReference1.IWCFEducation" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFEvidence">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFEvidence" contract="ServiceReference1.IWCFEvidence" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFFormativeCredit">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFFormativeCredit"
contract="ServiceReference1.IWCFFormativeCredit" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFInstructionalEntity">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFInstructionalEntity"
contract="ServiceReference1.IWCFInstructionalEntity" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFKnowledge">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFKnowledge" contract="ServiceReference1.IWCFKnowledge" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFResponsibility">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFResponsibility"
contract="ServiceReference1.IWCFResponsibility" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFRole">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFRole" contract="ServiceReference1.IWCFRole" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFRoleScheme">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" name="WCFRoleScheme" contract="ServiceReference1.IWCFRoleScheme" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFScale">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
binding="basicHttpBinding" name="WCFScale" contract="ServiceReference1.IWCFScale" />
</service>
<service behaviorConfiguration="ServiceBehaviour" name="ServiceReference1.WCFSkill">
<endpoint address="http://193.205.191.6/WCFSiretCM/WCFSiretCM.svc"
binding="basicHttpBinding" name="WCFSkill" contract="ServiceReference1.IWCFSkill" />
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
while the client side web.config is:
<configuration>
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<httpRuntime maxQueryStringLength="2097151"/>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="EndPointBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="CustomBinding" 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="2147483647" 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://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFAgency" name="BasicHttpBinding_IWCFAgency" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFPerson" name="BasicHttpBinding_IWCFPerson" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFCertificate" name="BasicHttpBinding_IWCFCertificate" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFAttitude" name="BasicHttpBinding_IWCFAttitude" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFClassificationType" name="BasicHttpBinding_IWCFClassificationType" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFCompetence" name="BasicHttpBinding_IWCFCompetence" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFCompetenceDetail" name="BasicHttpBinding_IWCFCompetenceDetail" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFCompetenceScheme" name="BasicHttpBinding_IWCFCompetenceScheme" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFCompetencyDetail" name="BasicHttpBinding_IWCFCompetencyDetail" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFCompetencyScheme" name="BasicHttpBinding_IWCFCompetencyScheme" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFContext" name="BasicHttpBinding_IWCFContext" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFEducation" name="BasicHttpBinding_IWCFEducation" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFEvidence" name="BasicHttpBinding_IWCFEvidence" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFFormativeCredit" name="BasicHttpBinding_IWCFFormativeCredit" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFInstructionalEntity" name="BasicHttpBinding_IWCFInstructionalEntity" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFKnowledge" name="BasicHttpBinding_IWCFKnowledge" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFResponsibility" name="BasicHttpBinding_IWCFResponsibility" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" contract="ServiceReference1.IWCFRole"
name="BasicHttpBinding_IWCFRole" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc"
behaviorConfiguration="EndPointBehavior" binding="basicHttpBinding"
bindingConfiguration="CustomBinding" contract="ServiceReference1.IWCFRoleScheme"
name="BasicHttpBinding_IWCFRoleScheme" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFScale" name="BasicHttpBinding_IWCFScale" />
<endpoint address="http://localhost/WCFSiretCM/WCFSiretCM.svc" behaviorConfiguration="EndPointBehavior"
binding="basicHttpBinding" bindingConfiguration="CustomBinding"
contract="ServiceReference1.IWCFSkill" name="BasicHttpBinding_IWCFSkill" />
</client>
</system.serviceModel>
</configuration>
If you want to send large amount of data in WCF you probably could use Streamed mode.
http://msdn.microsoft.com/en-us/library/ms731913.aspx
http://msdn.microsoft.com/en-us/library/ms733742.aspx
Or you could use workaround and transfer your data in chunks by implementing several methods in service, like
StartUpload()
SendChunk(byte[] chunk)
EndUpload()
There're really two options if you decide to chunk your message as supposed to simply increase max quota or timeout's.
OPTION 1: Chunk it yourself
OPTION 2: Channel Chunking
http://msdn.microsoft.com/en-us/library/aa717050(v=vs.110).aspx
I am trying to setup the SightMax livechat using the https, but when request the url below
https://livechat.domain.com/Live-Chat/agentinterfacejson.svc/ssl/chat/RequestSurvey
It return this error
Could not find a base address that matches scheme https for the
endpoint with binding WebHttpBinding. Registered base address schemes
are [http].
Have tried research around but still cannot get it right,
below is my web.config
The IIS already setup with binding to the https.
<bindings>
<customBinding>
<binding name="jsonpBinding">
<jsonpMessageEncoding/>
<httpTransport manualAddressing="true"/>
</binding>
<binding name="jsonpBindingSsl">
<jsonpMessageEncoding/>
<httpsTransport manualAddressing="true"/>
</binding>
</customBinding>
<webHttpBinding>
<binding name="jsonBinding" maxReceivedMessageSize="52428800">
<readerQuotas maxDepth="52428800" maxStringContentLength="52428800" maxArrayLength="52428800"/>
</binding>
<binding name="sslJsonBinding">
<security mode="Transport"/>
</binding>
<binding name="jsonpBindingSsl">
<security mode="Transport"/>
</binding>
</webHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJson">
<endpoint address="chat" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonEndpointBehavior"
binding="webHttpBinding" bindingConfiguration="sslJsonBinding"
name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonEndpointBehavior"
binding="webHttpBinding" bindingConfiguration="sslJsonBinding"
name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonpBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonp">
<endpoint address="chat" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonpEndpointBehavior"
binding="customBinding" bindingConfiguration="jsonpBindingSsl"
name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonpEndpointBehavior"
binding="customBinding" bindingConfiguration="jsonpBindingSsl"
name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
</services>
Any ideas on this ? Thanks
I have tried to put the base address on each service, but still no luck.
<services>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJson">
<host>
<baseAddresses>
<add baseAddress="https://livechat.domain.com/Live-Chat/agentinterfacejson.svc/"/>
</baseAddresses>
</host>
<endpoint address="chat" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonEndpointBehavior" binding="webHttpBinding" bindingConfiguration="jsonBinding" name="jsonSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonEndpointBehavior"binding="webHttpBinding" bindingConfiguration="sslJsonBinding"name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonEndpointBehavior"binding="webHttpBinding" bindingConfiguration="sslJsonBinding"name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
<service behaviorConfiguration="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonpBehavior" name="SmartMax.SightMax.AgentInterfaceService.AgentInterfaceJsonp">
<host>
<baseAddresses>
<add baseAddress="https://livechat.domain.com/Live-Chat/agentinterfacejson.svc/"/>
</baseAddresses>
</host>
<endpoint address="chat" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpChat" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat"/>
<endpoint address="site" behaviorConfiguration="jsonpEndpointBehavior" binding="customBinding" bindingConfiguration="jsonpBinding" name="jsonpSite" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite"/>
<!--Uncomment in order to enable SSL-->
<endpoint address="ssl/chat" behaviorConfiguration="jsonpEndpointBehavior"binding="customBinding" bindingConfiguration="jsonpBindingSsl"name="jsonChatSsl" contract="SmartMax.SightMax.Chat.Visitor.IRemotedVisitorChat" />
<endpoint address="ssl/site" behaviorConfiguration="jsonpEndpointBehavior"binding="customBinding" bindingConfiguration="jsonpBindingSsl"name="jsonSiteSsl" contract="SmartMax.SightMax.Website.IRemotedVisitorWebsite" />
</service>
</services>
You appear to be missing a BaseAddress and your endpoint address are relative.
<baseAddresses>
<add baseAddress="https://livechat.domain.com/Livechat/agentinterfacejson.svc" />
</baseAddresses>
WCF Service Host settings