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 4555536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:14:22+00:00 2026-05-21T17:14:22+00:00

I have a WCF Ria service which invokes several wcf services (non Ria). I’m

  • 0

I have a WCF Ria service which invokes several wcf services (non Ria). I’m using ChannelFactory to create channels, but the problem is that I want to write unit tests for this Ria Service and ChannelFactory is a class, not an interface, so I can’t mock it. An ideal solution would be to declare IChannelFactory and use dependency injection, but there is a problem here.

ChannelFactory has an overload of CreateChannel which takes the name of endpoint configuration name defined in web/app.config file. I’m using that method, this way I don’t have to hardcode endpoint parameters or create additional ConfigurationProperties to reinvent the wheel. IChannelFactory doesn’t have this member, so even when I inject ChannelFactory into my service, I’m unable to create a channel configured from configuration file. So my question is, how to workaround this issue? I mean how to create a channel and configure it from configuration file using IChannelFactory contract without Reflection/dynamic?

  • 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-21T17:14:23+00:00Added an answer on May 21, 2026 at 5:14 pm

    Well, I found a solution by creating my own IChannelFactory. One of it’s implementation relies on ChannelFactory and the other one is mocked 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing unit testing for our WCF RIA services, which have RequiresRole or RequiresAuthentication
I have a strange little issue with a WCF RIA service I'm using in
Hi i am using WCF RIA services class in Silverlight. I do have a
Hello guys im using WCF RIA Services i have domain services where i wrote
I have a Silverlight project (in VB), which uses a (WCF RIA) Domain Service,
I have a complex RIA client that communicates with a WCF SOAP web service,
So I have wcf rest service which succesfuly runs from a console app, if
I have a WCF web service which is responsible for managing work sent from
Is it possible to have a mix of RIA WCF services and custom WCF
I have a WCF RIA Domain Service that contains a method I'd like to

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.