the resource cannot be found wcf service with SSL - asp.net

I created a REST api using asp.net vb and I was trying to invoke the api through secure connection (https) but I had an error
The resource cannot be found
I can invoke any method using (http), but with (https) I can't. And I can access the main page of api (service.svc) using the (https) but the problem with functions!! below are my config and function header.
<system.serviceModel>
<services>
<service name="RESTAPI" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint address="customBinding" binding="customBinding" bindingConfiguration="basicConfig" contract="RESTAPI"/>
<endpoint address="" behaviorConfiguration="HerbalAPIAspNetAjaxBehavior"
binding="webHttpBinding" contract="HerbalAPI" />
<endpoint contract="RESTAPI" binding="mexHttpBinding" address="mex" />
</service>
</services>
<!-- **** Services ****-->
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="HerbalAPIAspNetAjaxBehavior">
<webHttp helpEnabled="true" />
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="basicConfig">
<binaryMessageEncoding/>
<httpTransport transferMode="Streamed" maxReceivedMessageSize="67108864"/>
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
API Class
<ServiceContract(Namespace:="")>
<AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)>
Public Class RESTAPI
<OperationContract()>
<WebInvoke(Method:="GET", ResponseFormat:=WebMessageFormat.Json, RequestFormat:=WebMessageFormat.Json)>
Public Function test(ByVal st As String) As JSONResultString
//any code
End Function
End Class

You need to define a special binding configuration in your web.config file to allow the SVC service to bind correctly for HTTPS requests.
Please have a look at this blog post: https://weblogs.asp.net/srkirkland/wcf-bindings-needed-for-https
Your service will already be defined in the web.config, just add the bindingConfiguration attribute:
<services>
<service name="TestService">
<endpoint address="" behaviorConfiguration="TestServiceAspNetAjaxBehavior"
binding="webHttpBinding" bindingConfiguration="webBindingHttps" contract="TestService" />
</service>
</services>
Then define the special binding settings for the webHttpBinding as so, the magic part that fixes the HTTPS request is the <security mode="Transport" />:
<bindings>
<webHttpBinding>
<binding name="webBindingHttps">
<security mode="Transport">
</security>
</binding>
</webHttpBinding>
</bindings>
This will effectively switch the service over to HTTPS, but if you want to have both HTTP and HTTPS to work you need to define 2 binding configurations and then have 2 identical endpoints per service, where the one uses the http bindingConfiguration and the other uses the https bindingConfiguration like so:
<bindings>
<webHttpBinding>
<binding name="webBindingHttps">
<security mode="Transport">
</security>
</binding>
<binding name="webBindingHttp">
<!-- Nothing special here -->
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="TestService">
<endpoint address="" behaviorConfiguration="TestServiceAspNetAjaxBehavior"
binding="webHttpBinding" bindingConfiguration="webBindingHttps" contract="TestService" />
<endpoint address="" behaviorConfiguration="TestServiceAspNetAjaxBehavior"
binding="webHttpBinding" bindingConfiguration="webBindingHttp" contract="TestService" />
</service>
</services>

Related

Service does not have a Binding with the None Message Version

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.

WCF open to internet users

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.

How can I host a WCF service without an SVC file in IIS

I'd like to deploy a dual interface (SOAP/REST/XML/JSON) WCF service in IIS with just a config file and the binaries and no svc file in the URL
We use VS2012 and .Net 4.5
We have something like it working, I followed a guide here:
http://blogs.msdn.com/b/rjacobs/archive/2010/04/05/using-system-web-routing-with-data-services-odata.aspx
I added a Global class with
public class Global : HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes();
}
private void RegisterRoutes()
{
DataServiceHostFactory factory = new DataServiceHostFactory();
RouteTable.Routes.Add(new ServiceRoute("wrap", factory, typeof(NeOtheWrapper)));
}
}
And I used my existing web.config which defines all the endpoints:
<system.serviceModel>
<!-- Clients -->
<client>
<endpoint name="MySoftLive" address="https://backof.somewebsitett.com/Cmp.MySoft.bl/MySoft.svc" binding="basicHttpsBinding" bindingConfiguration="soapSecureBindingConfig" contract="Cmp.MySoft.BL.WCF.MySoftInterface" />
<endpoint name="MySoftTest" address="http://localhost:49957/MySoft.svc" binding="basicHttpBinding" bindingConfiguration="soapBindingConfig" contract="Cmp.MySoft.BL.WCF.MySoftInterface" />
</client>
<!-- Services -->
<services>
<service name="Cmp.MySoft.BL.NeOthe.NeOtheWrapper">
<endpoint name="rest" address="rest" behaviorConfiguration="restEndpointBehaviour" binding="webHttpBinding" bindingConfiguration="restBindingConfig" contract="Cmp.MySoft.BL.NeOthe.INeOtheWrapper"/>
<endpoint name="restSecure" address="rest" behaviorConfiguration="restEndpointBehaviour" binding="webHttpBinding" bindingConfiguration="restSecureBindingConfig" contract="Cmp.MySoft.BL.NeOthe.INeOtheWrapper"/>
<endpoint name="mex" address="mex" behaviorConfiguration="" binding="mexHttpBinding" bindingConfiguration="mexBindingConfig" contract="Cmp.MySoft.BL.NeOthe.INeOtheWrapper"/>
<endpoint name="mexSecure" address="mex" behaviorConfiguration="" binding="mexHttpsBinding" bindingConfiguration="mexSecureBindingConfig" contract="Cmp.MySoft.BL.NeOthe.INeOtheWrapper"/>
<endpoint name="soap" address="soap" behaviorConfiguration="" binding="basicHttpBinding" bindingConfiguration="soapBindingConfig" contract="Cmp.MySoft.BL.NeOthe.INeOtheWrapper"/>
<endpoint name="soapSecure" address="soap" behaviorConfiguration="" binding="basicHttpsBinding" bindingConfiguration="soapSecureBindingConfig" contract="Cmp.MySoft.BL.NeOthe.INeOtheWrapper"/>
</service>
</services>
<!-- Binding Configurations -->
<bindings>
<webHttpBinding>
<binding name="restBindingConfig">
<security mode="None"/>
</binding>
<binding name="restSecureBindingConfig">
<security mode="Transport"/>
</binding>
</webHttpBinding>
<mexHttpBinding>
<binding name="mexBindingConfig"/>
</mexHttpBinding>
<mexHttpsBinding>
<binding name="mexSecureBindingConfig"/>
</mexHttpsBinding>
<basicHttpsBinding>
<binding name="soapSecureBindingConfig">
<security mode="Transport"/>
</binding>
</basicHttpsBinding>
<basicHttpBinding>
<binding name="soapBindingConfig">
<security mode="None"/>
</binding>
</basicHttpBinding>
</bindings>
<!-- Behaviour Configurations -->
<behaviors>
<endpointBehaviors>
<behavior name="restEndpointBehaviour">
<webHttp helpEnabled="true" defaultBodyStyle="Bare" defaultOutgoingResponseFormat="Json" automaticFormatSelectionEnabled="true" faultExceptionEnabled="true" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<!-- Hosting Environment Settings -->
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
It compiles, runs and if I browse to http://mypc:12345/wrap/rest/help I get the auto generated ASP.NET REST help page.
But, if I go to http://mypc:12345/wrap/soap/ I get 400 Bad Request.
I can't suffix that with ?wsdl to get the wsdl, or pass the url to svcutil (soap+xml not expected)
I was hoping the .SVC SOAP place holder page would appear, same as /help does for REST.
If I browse to the .svc file (it's at the same level as /wrap) that works and the soap service works, as does meta data publishing.
Am I using the wrong URL or is my configuration wrong?
If you're using WCF 4.0 or later, you can use "file-less" activation. Add something like the following to config your file:
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
<serviceActivations>
<add factory="System.ServiceModel.Activation.ServiceHostFactory"
relativeAddress="Soap.svc"
service="Cmp.MySoft.BL.NeOthe.NeOtheWrapper" />
</serviceActivations>
</serviceHostingEnvironment>
This allows you to host a WCF service without a physical .svc file. The relativeAddress is relative to the base address of the site, and you'll need to create the IIS application as usual.
See the "File-Less activation" section in A Developer's Introduction to Windows Communication Foundation 4 for more information.

Wcf-The maximum message size quota for incoming messages (65536) has been exceeded?

The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
<system.serviceModel>
<services>
<service name="FileService.Service1" behaviorConfiguration="FileService.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8732/Design_Time_Addresses/FileService/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address ="" binding="wsHttpBinding" contract="FileService.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="FileService.Service1Behavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
You should set maxReceivedMessageSize="2147483647" to increase message size. Try to change config to this:
<binding maxBufferSize="2147483647"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
But it is a bad practice to increase you message values to max value. This can lead you to serious troubles with DOS leaks.
UPDATED:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsBinding" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" >
<readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="FileService.Service1" behaviorConfiguration="FileService.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8732/Design_Time_Addresses/FileService/Service1/" />
</baseAddresses>
</host>
<endpoint address ="" binding="wsHttpBinding" bindingConfiguration="wsBinding" contract="FileService.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="FileService.Service1Behavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding

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

Resources