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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:20:34+00:00 2026-06-04T19:20:34+00:00

Documentation says that I can apply multiple Interceptor attributes per class. Nevertheless I’m getting

  • 0

Documentation says that I can apply multiple Interceptor attributes per class. Nevertheless I’m getting an syntax error duplicated attribute. Also this post suggest that I can apply interceptors to methods, but I can’t! My tests only pass if I apply them to the class, what is moreover annoying if I want interceptors to be executed only for certain methods.

[Interceptor (typeof (CastleWindsorAspect))]
[Interceptor (typeof (AnotherCastleWindsorAspect))]
public class CastleWindsorDomainType { }
  • 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-04T19:20:36+00:00Added an answer on June 4, 2026 at 7:20 pm

    You do indeed can apply multiple interceptors to a component. You can do it using the fluent registration API and using the XML config.

    You should also be able to do it via custom attributes, like you demonstrated, but it would appear there’s a bug in Windsor that doesn’t allow you to specify it multiple times (hence the error you’re seeing). I would recommend reporting this as a bug and use the registration API to attach multiple intereceptors in the meantime.

    As for applying interceptors to methods you can do that, but not declaratively. Instead you’d need to specify IProxyGenerationHook or IInterceptorsSelector to control which methods should be proxied and/or which interceptors should be applied to which of the proxied methods.

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

Sidebar

Related Questions

The Apple documentation says that the sender passed to the NSMenuItem's action can be
The Moose documentation says that I can delegate to the object thing easily enough.
Have a small doubt with static method. Documentation says that Static method can't access
The documentation for @ParametersAreNonnullByDefault says, that: This annotation can be applied to a package,
The Android documentation says that best practices are to make two drawable directories -
i have a simple question in the objectify documentation it says that Only get(),
PLT Scheme 's documentation says: The rationale for providing print is that display and
In some of the NSIS Installer documentation, it says that if some operation fails,
The documentation for write() says: Returns false to indicate that the kernel buffer is
Microsoft already says, in the documentation for GetTickCount, that you could never compare tick

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.