Print Page | Close Window

SVC error when deployed to DiscountAsp

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1622
Printed Date: 12-Mar-2025 at 6:03pm


Topic: SVC error when deployed to DiscountAsp
Posted By: *Calsy
Subject: SVC error when deployed to DiscountAsp
Date Posted: 21-Jan-2010 at 1:41pm
Hi All, Im just deploying our website to DiscountAsp web host. All going well until I went to run the web app and got a really nasty error when it tried to connect to the db. I tried to hit the entityservice.svc and got the following error message on the screen:
 
This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
Parameter name: item
 
There seems to be a bit out there about manipulating the servicefactory for the service to fix this but i can see that the entityserver.svc file already points to an ideablade service factory so im drawing blanks on how i will fix it.
 
Thought i was about to cross the finish line but got slapped in the face by this bugger. PLEASE HELP.
 
Thanks



Replies:
Posted By: francois
Date Posted: 25-Jan-2010 at 4:05am
Hi,
 
You will need to do two things to get this sorted out:
 
1) Edit serviceHostingEnvironment with baseAddressPrefix Filter eg.
 
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
 <baseAddressPrefixFilters>
        <add prefix=" http://www.yoursite.com// - http://www.yoursite.com/"/ >
      </baseAddressPrefixFilters>
 </serviceHostingEnvironment>
 
2) Ensure you have a factory defined in EntityServer.svc eg
 
< mailto:%@ServiceHost - %@ServiceHost language="C#" 
 Service="IdeaBlade.EntityModel.Server.EntityServer"
 Factory="IdeaBlade.EntityModel.Server.ServerHostFactory"
%>
 
That should do it...



Print Page | Close Window