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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:43:04+00:00 2026-06-05T12:43:04+00:00

I have created a Permission Attribute and used it in my methods written in

  • 0

I have created a Permission Attribute and used it in my methods written in my BLL. It works fine and debug well if i need to. But when i used the same attribute in my WCF layer it simply stops working. Not giving any error but permissions has not been checked and no debugging. Code is just ignoring the attribute.

To make things simple i use this approach

My WCF methods calls another methods defined in the same class as the WCF methods and that child method calls the BLL and this child method has the Permission Attribute on it.

But no use. Kindly guide.

  • 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-05T12:43:05+00:00Added an answer on June 5, 2026 at 12:43 pm

    PostSharp is part of the build process. I suspect the library which contains your WCF services don’t run the PostSharp post-compilation process which interweaves the attribute code with your own. If it doesn’t your breakpoints…etc. for the PostSharp code will not work.

    Usually the post-compilation process is done by a background application that resides in the system tray on your development PC. It can be disabled however. I don’t know how you are compiling the WCF service libraries.

    You can manually add PostSharp to your project:

    • Adding PostSharp to your project manually

    To quote the PostSharp documentation:

    1. Open the project file (csproj, vbproj, …) using a text editor. If your project is loaded in Visual Studio, open the Solution Explorer, right-click on the project name, click on Unload project, then right-click again on the same project and click on Edit.

    2. Locate the elements near to the end of the file. For instance, a C# 2.0 project should end with an element similar to this:

      <Import Project=”$(MSBuildBinPath)\Microsoft.CSharp.targets” />

    3. Before the import line, insert the following text:

      <PropertyGroup><DontImportPostSharp>True</DontImportPostSharp></PropertyGroup>

    4. After the C# / VB import line, insert the following text:

      <Import Project=”….\Third Party\PostSharp 2.0\PostSharp.targets” />

    5. Save the file and reload the project.

    6. Compile.

    If you are are calling methods from your BLL assemblies please check if the PostSharp post-compilation process is also run correctly.

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

Sidebar

Related Questions

I have set permission to allow anonymous user to create page. but when the
I have a User model object whose permission attribute is restricted by validates_inclusion_of to
I am trying to assign permission to a file i have created which is
I have created a new user account and gave them select and update permission
For an ASP.Net environment what permissions should the logging file created by NLog have
I have created the following C library for reading an image: typedef struct {
I have created a skin for DotNetNuke 5.x and I attempted to do as
I have created a basic site using ASP.NET routing according to Mike Ormond's example
I have created a simple test form with FormBorderStyle = FixedToolWindow by default and
I have created a file with XmlDocument xmldoc = new XmlDocument(); Can I make

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.