Configure .Net RIA Service – hosted on shared domain

1.Mark “copy to local” these 3 assembly in your web project:
1) System.Web.DomainService
2) System.Web.Ria
3) System.ComponentModel.DataAnnotations

This will deploy above mentioned assemblies in you bin folder

Test your web service via like
http://www.yoursite.com/virDir/namespace-Web-AuthenticationService.svc
where namespace.Web.AuthenticationService is your RIA domain service.
Internally at runtime RIA replaces . with –
Here you will get error as “This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.”

2.Add following code to your web.config
<serviceHostingEnvironment aspNetCompatibilityEnabled=”true”>
<baseAddressPrefixFilters>
<add prefix=”http://www.yoursite.com”/&gt;
</baseAddressPrefixFilters>
</serviceHostingEnvironment>

You also need to change the service reference inside your Silverlight code to point to the service with an absolute address. Following is a sample that I used in my application:
3. open file Namespace.Web.g.cs in hidden folder Generated_Code under silverlight project.
Replace UriKind something like new Uri(“namespace-Web-UserRegistrationService.svc”, UriKind.Relative) to new Uri(“namespace-Web-UserRegistrationService.svc”, UriKind.Absolute)

Try to re run your service url you will now get error “IIS specified authentication schemes ‘Basic, Anonymous’, but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.”

4.Reduced your site’s authentication to “Anonymous” and everything worked great. The exact details on how you do this vary from ISP to ISP

Microsoft is still working on this and will soon (hopefully) fix the issue’s in further release of ria services.

2 responses to “Configure .Net RIA Service – hosted on shared domain”

  1. to domain name

    hi guys…

    hi guysI would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well and i have start my own blog now, , thanks for your effort…

    Like

  2. Many thanks for the info. Very good post!

    Like

Leave a comment