ASPHostCentral.com ASP.NET and Windows Hosting BLOG
All about ASP.NET 4.5 Hosting, ASP.NET 4 Hosting, ASP.NET MVC 4.0 Hosting, Sharepoint 2013 Hosting, and all Windows 2012 Hosting articles
<< ASP.NET 4 Hosting :: CORE Services in ASP.NET 4 Framework
|
WCF RIA Service Hosting :: Error Message - Load Operation Failed for query "GetUser" >>
WCF RIA Service Hosting :: Error Message - This collection already contains an address with scheme http
February 22, 2010 17:49 by
Administrator
Today, we are going to discuss a common issue that you may find when running WCF RIA service on a shared hosting server.
ASPHostCentral.com
, as the premier ASP.NET and Windows Hosting provider, proudly presents this article to anyone and we believe it will help many ASP.NET communities; especially to those who are using WCF RIA Service. In case you are looking for WCF RIA Service Hosting, you can always consider ASPHostCentral.com and you can start from our lowest Standard Plan
@$4.99/month
to host your WCF-service site.
One of the most common errors that you may find when running your WCF RIA Service on a shared hosting server is the error message:
“
This collection already contains an address with scheme http.
There can be at most one address per scheme in this collection
.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: This collection already contains an address with scheme http.
There can be at most one address per scheme in this collection
.”
This error message can be retrieved on the Event Viewer window on the server. If you do not have an access to the server, you may contact your hosting provider to trace this error for you.
Solution:
This problem is caused by the fact that WCF only supports 1 IIS host header. Your hosting provider may have more than 2 host headers, namely
www.yourDomain.com
and yourDomain.com. Therefore, you may need to remove one of the host headers from the IIS.
Other Alternative Solution:
The other alternative solution you can consider is to create a separate .SVC file. The solution, since WCF services hosted in IIS can have only one Base Address was to create a custom service factory to intercept and remove the additional unwanted base addresses that IIS was providing. Your default IIS settings will have 2 entries of host headers, namely:
www.yourDomain.com
and yourDomain.com. You then need to customize your .svc file to specify a custom service factory. You are then able to create your custom factory by inheriting from ServiceHostFactory and overriding as required.
The following is the code:
class CustomHostFactory : ServiceHostFactory
{
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
CustomHost customServiceHost =
new CustomHost(serviceType, baseAddresses[1]);
return customServiceHost;
}
}
class CustomHost : ServiceHost
{
public CustomHost(Type serviceType, params Uri[] baseAddresses)
: base(serviceType, baseAddresses)
{ }
protected override void ApplyConfiguration()
{
base.ApplyConfiguration();
}
}
You need to pass through baseAddresses[1] (which was the www. address) but it would probably be wise to specify that address you want to prevent changes by your web host from impacting your code.
Please refer to this article at
http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx
for further information.
Reasons to trust your WCF-based website to ASPHostCentral.com
What we think makes
ASPHostCentral.com
so compelling is how deeply integrated all the pieces are. We integrate and centralize everything--from the systems to the control panel software to the process of buying a domain name. For us, that means we can innovate literally everywhere. We've put the guys who develop the software and the admins who watch over the server right next to the 24-hour Fanatical Support team, so we all learn from each other:
-
24/7-based Support
- We never fall asleep and we run a service that is operating 24/7 a year. Even everyone is on holiday during Easter or Christmas/New Year, we are always behind our desk serving our customers
-
Excellent Uptime Rate
- Our key strength in delivering the service to you is to maintain our server uptime rate. We never ever happy to see your site goes down and we truly understand that it will hurt your onlines business. If your service is down, it will certainly become our pain and we will certainly look for the right pill to kill the pain ASAP
-
High Performance and Reliable Server
- We never ever overload our server with tons of clients. We always load balance our server to make sure we can deliver an excellent service, coupling with the high performance and reliable server
-
Experts in WCF RIA Service Hosting
- Given the scale of our environment, we have recruited and developed some of the best talent in the hosting technology that you are using. Our team is strong because of the experience and talents of the individuals who make up ASPHostCentral
-
Daily Backup Service
- We realise that your website is very important to your business and hence, we never ever forget to create a daily backup. Your database and website are backup every night into a permanent remote tape drive to ensure that they are always safe and secure. The backup is always ready and available anytime you need it
-
Easy Site Administration
- With our powerful control panel, you can always administer most of your site features easily without even needing to contact for our Support Team. Additionally, you can also install
more than 100 FREE applications
directly via our Control Panel in 1 minute!
Happy hosting!
Related posts
WCF RIA Service Hosting :: WCF RIA Service Configuration in a Shared Hosting/Server
WCF RIA Service Configuration in a Shared Hosting/Server
Silverlight 3 Hosting :: RIA Services - RAD for the Middle Tier
Silverlight 3 Hosting :: RIA Services - RAD for the Middle Tier
WCF RIA Service Hosting :: Error Message - Load Operation Failed for query "GetUser"
Load Operation Failed for query "GetUser"
ASP.NET Hosting
ASPHostCentral is a premier web hosting company where you will find low cost and reliable web hosting. We have supported the latest
ASP.NET 4.5 hosting
and
ASP.NET MVC 4 hosting
. We have supported the latest
SQL Server 2012 Hosting
,
SharePoint 2013 hosting
and
Windows Server 2012 Hosting
too!
Search
Include comments in search
Tag cloud
.net 4 hosting
.net 4.5 hosting
.net4 hosting
asp.net 4 hosting
asp.net 4.0 hosting
asp.net 4.5 hosting
asp.net mvc 3 hosting
asp.net mvc 3.0 hosting
asp.net mvc hosting
asp.net4 hosting
asphostcentral
asphostcentral.com
crystal report 2010 hosting
crystal report hosting
managed metadata
moss 2007 hosting
moss 2010 hosting
mssql 2008 r2 hosting
mvc 3 hosting
mvc 3.0 hosting
mvc hosting
sharepoint 2007 hosting
sharepoint 2010 hosting
sharepoint 3 hosting
sharepoint foundation 2010 hosting
sharepoint hosting
sharepoint server 2010 hosting
silverlight hosting
sp 2010 hosting
spf 2010 hosting
sql 2008 r2 hosting
wcf hosting
wss 2010 hosting
wss 3 hosting
wss hosting
Month List
2013
April (1)
January (3)
2012
December (4)
November (9)
October (3)
September (7)
August (1)
June (1)
March (7)
January (1)
2011
November (23)
October (15)
September (14)
August (2)
July (7)
June (2)
May (8)
April (7)
March (19)
February (2)
January (5)
2010
December (2)
November (8)
October (9)
September (10)
August (12)
July (4)
June (16)
May (4)
April (27)
March (4)
February (6)
January (5)
2009
November (4)
October (2)
August (2)
July (7)
June (1)
May (5)
April (7)
March (6)
February (13)
Other Hosting BLOG
ASPHostCentral.com
Reporting Service (SSRS) Hosting BLOG
ASP.NET MVC Hosting BLOG
Crystal Report Hosting BLOG
Sharepoint Hosting BLOG
Sharepoint 2010 Hosting BLOG
.NET4 Hosting BLOG
European ASP.NET 4.5 Hosting
ASPHostCentral.com REVIEW
ASPHostCentral.COM Twitter
Sharepoint Hosting NEWS
SQL 2008 R2 Hosting News
Silverlight WCF RIA Service Hosting News
ASP.NET 4.0 Hosting News
Sign in