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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:30:06+00:00 2026-05-12T07:30:06+00:00

I an developing a WCF service where I need to intercept incoming messages for

  • 0

I an developing a WCF service where I need to intercept incoming messages for custom validations.
After my research, I found that I need to implement IDispatchMessageInspector for this purpose. So, I inserted my custom validations inside AfterReceiveRequest method of the interface.

The problem:
When I debug the code, I saw that message reception do not trigger the AfterReceiveRequest method that I have implemented.

The question:
Do I need to register my class/method somewhere to trigger when messages are received?

  • 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-12T07:30:06+00:00Added an answer on May 12, 2026 at 7:30 am

    You have implemented the IDispatchMessageInspector – but have you added it to the ServiceHost’s .Behaviors collection on the server side so that it will be included?

    See this blog post for details – first you need to create a class implementing IEndpointBehavior (or a IServiceBehavior – whichever you need) and implement the ApplyDispatchBehavior method on it.

    Then you need to either add this behavior to the ServiceHost before you open it, or you need to create another class to allow you to configure this behavior for your service.

    Marc

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

Sidebar

Related Questions

I am currently developing an approval routing WCF service that will allow an user
I have a RESTful service that I am developing in WCF . I am
I am developing a Windows service that exposes a WCF service intended to be
I'm developing a WCF service that accepts parameters in JSON. I cant' figure out
I am developing a wcf service ( basicHttpBinding ) that should also be consumed
I am developing a WCF service that will be called by customer in internet.
I am in the process of developing a WCF service that needs to take
I'm developing a WCF Service with a custom UserNamePasswordValidator with a basicHttpBinding. This configuration,
I am currently developing a WCF duplex service that allows a server and a
I am developing a WCF service on my local computer using Visual Studios built

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.