Sitefinity 4.0 Beta: Deploying projects to ISPs - General Discussions - General Discussions - Progress Community
 General Discussions

Sitefinity 4.0 Beta: Deploying projects to ISPs

  • Sitefinity 4.0 Beta: Deploying projects to ISPs
  • I deployed a SF 4.0 Beta project to my isp.

    1) Deployed the db. Worked fine.
    2) Depoyed the web site files
    3) Edited the data config file and changed the connection string.

    Now, i can hit the SF site fine. Its just one page: http://www.partnerrock.com/

    But if i hit the SF admin area, i run into a problem. The dashboard comes up fine, but clicking the Pages option returns this error:
    Message from webpage: This collection already contains an address with schemd http.&nbsp: There can be at most one address per scheme in this collection. <br>parameter name: item

    This occurs each time i click the Pages tab. Other tabs seem to work fine.

    Ken
  • Hey Ken,

    I'm having the same problem but I think I found a workaround.  This error is stemming from running WCF services from a site with multiple bindings in IIS (multiple host headers per site).  This IIS configuration is very common and I guess this is the intended design of WCF services my Microsoft.

    My workaround is:

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.ServiceModel;
    using System.Configuration;
     
    namespace MySite.Web.Services
        public class WcfHostFactory : Telerik.Sitefinity.Web.Services.WcfHostFactory
        
            public WcfHostFactory()
                : base()
            
     
            
     
            protected override ServiceHost CreateServiceHost(Type type, Uri[] uri)
            
                string baseServiceHost = ConfigurationManager.AppSettings["baseServiceHost"];
                IDictionary<string, int> schemes = new Dictionary<string, int>();
                List<Uri> clean = new List<Uri>();
                for (int i = 0; i < uri.Length; i++)
                
                    try
                    
                        if (uri[i].Host == baseServiceHost)
                        
                            schemes.Add(uri[i].Scheme, i);
                            clean.Add(uri[i]);
                        
                    
                    catch (ArgumentException)
                    
                
                return base.CreateServiceHost(type, clean.ToArray());
            
        

    There's probably a more graceful way to do it but this was my first pass at it.

    Then I replace the Telerik WcfHostFactory with my wrapper in the PagesService.svc file:

    <%@ ServiceHost Language="C#" Debug="true" Service="Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService" Factory="MySite.Web.Services.WcfHostFactory" %>

    Add an appSettings key to your web.config:

    <add key="baseServiceHost" value="www.partnerrock.com"/>

    And it should work.  Of course, you will have to find and replace all instances of Telerik.Sitefinity.Web.Services.WcfHostFactory in your .svc files.  that's my next step.

    Cheers!
    Bryan
  • Hi Bryan,

    Thank you for providing the workaround. We are going to resolve this issue by providing the ability to set default bindings for services.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Did you try setting the baseAddressPrefixFilters element in your web.config?

    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true">
            <baseAddressPrefixFilters>
                <add prefix="http://www.partnerrock.com/" />
            </baseAddressPrefixFilters>
        </serviceHostingEnvironment>
    <system.serviceModel>

    Here is Microsoft's documentation regarding multiple IIS bindings, http://msdn.microsoft.com/en-us/library/aa751841.aspx.

    Edit: It looks like this solution currently doesn't work and has been logged in the teams bug list. See forum thread.