How to modify the Sueetie web.config and SueetieService.svc files to support sites with multiple host identities. Multiple WCF Host Identities is a feature in the
Sueetie Premium Edition.You say Tomato, I say Tomato.com
In Enterprise environments it is often the case that the same Sueetie Social Media Site is configured with multiple IIS Identities and accessed with multiple host names. An example would be
http://external.coolcompany.com and internally as
http://coolcompanynet. Sueetie uses Microsoft's WCF Services extensively. WCF is able to support a single base address, so errors to your server Event Log would be generated for any site whose identity does not conform to the base address specified in the Sueetie web.config's WCF settings. Fortunately, Sueetie has a solution.
Configuring Sueetie WCF for Multiple IIS Host Identities
Sueetie makes it simple for your Sueetie site to support WCF services in a multi-host environment. We're going to make modifications to two files only. Your favorite text editor will suffice. The two files we're going to update are the SueetieService.svc and the web.config.
SueetieService.svc
Sueetie Premium Edition includes a special "ServiceHostFactory" class that modifies how WCF Service Hosts are created. We're going to specify that Service Host Factory class in SueetieService.svc, located at /util/services/SueetieService.svc.
We're going to add a single "Factory" element to our @ServiceHost statement. Add it exactly as you see below.
<% @ ServiceHost Language="C#"
Debug="true"
Service="SueetieService"
CodeBehind="~/CodeFiles/SueetieService.cs"
Factory="Sueetie.Components.SueetieServiceHostFactory" %>
web.config
We're going to modify the web.config WCF settings to support multiple host endpoints. Replace the corresponding lines in your web.config with the following.
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<services>
<service name="SueetieService" behaviorConfiguration="SueetieServiceAspNetAjaxBehavior">
<host>
<baseAddresses>
<add baseAddress="http://domain1.com/util/services/SueetieService.svc"/>
<add baseAddress="http://domain2.com/util/services/SueetieService.svc"/>
</baseAddresses>
</host>
<endpoint behaviorConfiguration="SueetieServiceAspNetAjaxBehavior"
binding="webHttpBinding" contract="SueetieService" />
</service>
</services>
"Domain1.com" and "Domain2.com" or any additional hosts will be replaced by your site's hosts.
Top