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

  • Home
  • SEARCH
  • 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 9188715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:04:51+00:00 2026-06-17T20:04:51+00:00

I am using WCF for data services only (ie internal to the application and

  • 0

I am using WCF for data services only (ie internal to the application and very lean with no session state etc) to keep our web application scalable.

We need to provide some common properties for every service call that we are currently passing in all the time. Having single request objects for every call is not ideal as beyond these common properties, the rest are very varied and change quite frequently during development.

At the moment I’m considering using custom headers and the clientmessageinspector to do to set the values.
Is this the simplest recommended approach for this scenario or is there a better approach?

More detail..

The red points below are where I’m unsure the right approach (or how to go about it).

enter image description here

What’s being sent

The data being sent is simple set of ids (3 or 4 for userid, clientid etc) – all these ids have an impact on security and on performance (in some cases it determines what database to go to).

We will also be extending this to have more complex permissions – not needed for the windows workers.

The caller will be either a web application where these come off a session object, or a windows service worker where these are manually populated.

The Current Thinking

Ideally, getinstance on the caller’s workflow would either populate these properties automatically with the session object or more manually with the windows service calls (different constructors?).

We would then ensure that these parameters are always available without any thought or without constant references throughout the code to construct the contract on each function that calls it. We currently have a lot of service calls (due to scale/complexity of app, not due to bad engineering :)), so as this extends for complex permissions it is becoming a bit difficult to enforce rules in a self-documenting way.

Conceptually, session is where you’d take care of this in the app, but the services are really just a data access layer (with view mapping, pageing and last call security from repository calls) so we don’t need that sort of repitition or complexity, just the key identitiy & permission fields to include in queries.

The Problem

This feels very much like something we should be doing with headers on the calls as we always need these fields, but I’m a little unsure of where the set and get should sit in the lifecycle of the endpoint and the client interface. I’m also happy to be wrong about that.

  • 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-06-17T20:04:52+00:00Added an answer on June 17, 2026 at 8:04 pm

    I have applied a similar architecture; basicly every client call needs to carry some information regarding which DB to be selected, an identifier etc. And in the server side, these parameters shall be processed automatically and stored in a dictionary.

    I have created a generic proxy class to wrap client proxies, in order to add related headers to each service call. Every developer who needs to call a service, used this generic proxy class in their calls.

    In the service side, I have implemented a DispatchMessageInspector as an endpoint behavior, where data is extracted from request headers and stored in a dictionary. The dictionary is initialized inside an extension of OperationContext (IExtension<OperationContext>) and is available during the request processing.

    Note that the instance context mode of services are PerCall.

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

Sidebar

Related Questions

I'm using WCF services in the client application for transfering data from client to
We have several Silverlight 4 apps running using WCF Data Services on our website.
Using WCF Data Services (and the latest Entity Framework), I want to return data
Hi I have built a simple WCF application I am using to query data
I am writing a web service using WCF. I created data contracts. I created
I've just created a new data service using the WCF Data Services 4.1 CTP2
We were using the System.Data.Services.Client (version 4 I guess) of Microsoft WCF Data Services.
We are using WCF for transferring data from a server application to several clients.
I am using WCF Data Services 5.0 with the EF DbContext. I see old
We have a Silverlight application that uses WCF Data Services. We want to add

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.