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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:38:50+00:00 2026-05-22T21:38:50+00:00

I have a .NET 4.0 project with two modules that will communicate via WCF

  • 0

I have a .NET 4.0 project with two modules that will communicate via WCF services and I’d like to implement a custom encryption mechanism.

My scenario:

  • I control both endpoints (client and server) but not the connection between them

  • Windows auth is out of question, since I do not know at this point where the modules will be deployed and most likely they’ll be on different domains

  • I’d like to intercept the messages at some point and apply a custom encryption/decryption with a key that will be properly configured on both the server and the client, so if someone manages to intercept a message they wouldn’t be able to decrypt it.

  • I’d like to exchange data using binary serialization

  • I don’t want to deal with setting up certificates on either the client or server side

Can anyone point out what would be the most obvious solution to implement this scenario using WCF?

  • 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-22T21:38:51+00:00Added an answer on May 22, 2026 at 9:38 pm

    I would say that you don’t want security – static key for encrypting messages with symmetric encryption algorithm is just a notion of security.

    Anyway if you want to do that there are really extension points which will allow you to do that on many different levels.

    • Encrypting the whole message – that would require custom message encoder which can be quite hard to write.
    • Encrypting the body of the message – you can write custom IMessageInspector which will deal with encryption and decryption of message body. Headers will be still in plain text which is necessary unless you want to change many other things in WCF processing. You can wrap the inspector in custom IEndpointBehavior and use it either imperatively in the code or declaratively in the configuration (you will also need implementing custom BehaviorExtenxionElement).
    • Encrypting only some operations marked with custom IOperationBehavior or some data marked with IContractBehavior behavior and using IParameterInspector to decrypt and encrypt value.

    You have control over both client and server – use certificates instead of fake security.

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

Sidebar

Related Questions

I have a solution that contains two projects. One project is an ASP.NET Web
I have a project with two silverlight apps (foo1 and foo2) and an ASP.NET
Suppose you have two seperate ASP.NET Web Application projects that both need to use
I have a .net project that has a web reference to a service. I
I have a .net project (MySolution.Common) that uses the app.config. I am using the
I have a .NET project which references another assembly that is built outside of
I have a .net interop project that uses an app.config file. When I am
I'm writing a custom DAL (VB.NET) for an ordering system project. I'd like to
I have a .Net 3.5 class library project that I've migrated to use Visual
I have a CC.NET project configured to call a common NAnt build file, which

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.