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
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”>
<add prefix=””/&gt;

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.

Configuring RIA to use roleManager, membership and profile.

Create Silverlight Project “Business Navingation application” in Visual Studio 2010 Beta 2 and configure SQL express database to generate schema for rolemanager, membership and profile feature using command

Launch Visual Studio Command prompt (Run as administrator)
Type command
Aspnet_regsql.exe –E–S sqlinstance–A rmp
This will create sql express database aspnetdb

Visit links to see how to configure components mentioned above

Configure Role Manager
Configure Membership Manager
Configure profile Manager

Edit web.config file as
<!– Connection to database (also used by rolemanager,membership manager and profile manager) –>
<add name=”SQLDataSource” connectionString=”Data Source= .SQLExpress;Initial Catalog=aspnetdb;Integrated Security=SSPI;” />
<!– Configure Role Manager (See :–>
<roleManager enabled=”true” defaultProvider=”SqlDataRoleProvider”>
<providers> <clear />
<add name=”SqlDataRoleProvider”
applicationName=” APPName ” />
<!– Configure Membership Manager (See :–>
<membership defaultProvider=”SqlDataMemberProvider” userIsOnlineTimeWindow=”1″>
<providers> <clear />
<add name=”SqlDataMemberProvider”
applicationName=” APPName “
passwordFormat=”Hashed” />

<!– Configure profile Manager (See :–>
<profile defaultProvider=”SqlDataProfileProvider”>
<add name=”FriendlyName”/>
<providers> <clear />
<add name=”SqlDataProfileProvider” type=”System.Web.Profile.SqlProfileProvider”
connectionStringName=”SQLDataSource” applicationName=”APPName” />

For more details please follow links mentioned in post