Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6968493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:27:31+00:00 2026-05-27T16:27:31+00:00

Please, I have the following problem: I’m trying to dynamically load a WCF RIA

  • 0

Please, I have the following problem:
I’m trying to dynamically load a WCF RIA service (DDL and DAL for Silverlight app).
I have main application maintaining authorization, authentication and so on. The app is implemented using Prism libraries – highly modular, but unfortunately because of referencing the RIA service library tihgtly coupled, so it is impossible to switch modules depending on customers requirements without recompiling whole solution and causing trouble with autogenerated code. It is hosted in IIS (IIS Express).
What I’m trying to do is to remove the reference to custom module in the main Webpage app, load the module dynamically and create necesary endpoints.
My first approach was to define the service in Web.config:

    <services>
        <service name=PatientRegistry.PatientRegistryDomainService"
        behaviorConfiguration="RIAServiceBehavior">
            <endpoint address="" binding="wsHttpBinding"
            contract="PatientRegistryDomainService" />
            <endpoint address="/soap"
            binding="basicHttpBinding"
            contract="PatientRegistryDomainService" />
            <endpoint address="/binary"
            binding="customBinding"
            bindingConfiguration="BinaryHttpBinding"
            contract="PatientRegistryDomainService" />
        </service>

    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="RIAServiceBehavior">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <bindings>
        <customBinding>
            <binding name="BinaryHttpBinding">
                <binaryMessageEncoding />
                <httpTransport />
            </binding>
        </customBinding>
    </bindings>

Trouble was, that because it wasn’t referenced, the necesary assembly wasn’t loaded.

Then I tried to load the assembly in code, get the DomainServiceType from list of exported types (_types) and use DomainServiceHost:

    Type _svctype = null;
foreach (Type _T in _types)
{
    if (IsSubclassOfRawGeneric(typeof(DomainService), _T))
    {
        _svctype = _T;
        break;
    }
}
DomainServiceHost host = new DomainServiceHost(_svctype /*, BaseUri*/);
host.Open();

This approach failed on the wery same trouble all my previous attempts on selfhosting RIA: AspNetCompatibilityModeAttribute:
This service requires ASP.NET compatibility and must be hosted in IIS. Either host the service in IIS with ASP.NET compatibility turned on in web.config or set the AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode property to a value other than Required.
I’ve tried to set the attribute on the domain service by adding

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

but it had no effect. I’m quite desperately googling for quite a long time, but to no success.
Could you please kick me in the right direction on how to load unreferenced RIA service server?

P.S. I’m on Silverlight 5, VS2010

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:27:32+00:00Added an answer on May 27, 2026 at 4:27 pm

    Have you tried to include this in your web.config?

    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    </system.serviceModel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am new here. i have a slight problem; PLease look at the following code
Please help me to resolve the following problem: First of all, I have one
Hi I have the following problem and I am trying to work out what
I have the following code in a WCF Service that returns a string, and
please help me with the following problem. i have a class, like public class
Guys, please help me with the following problem. I have encountered the famous cannot
I have the following strange problem in Oracle (Please keep in mind that I
We are having 2 problem with jquery. Please have a look at the following...
Please help me with the following problem: I have the following classes: class ChemicalElement
Could someone please help me out with the following problem in java. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.