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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:03:39+00:00 2026-05-14T17:03:39+00:00

I am implementing a WCF service that uses transaction propagation. The ASP .nET Security

  • 0

I am implementing a WCF service that uses transaction propagation.

The ASP .nET Security model with SQL Server (SqlRoleProvider) is used for authorization. I am using declarative security via the PrincipalPermission attribute, as shown below.

[ServiceBehavior(TransactionIsolationLevel = IsolationLevel.Serializable)]
public class MyService : IMyService
{
    [PrincipalPermission(SecurityAction.Demand, Role = "RoleName")]
    [OperationBehavior(TransactionScopeRequired = true)]
    public void DoSomething()
    {
    }
}

Here’s the question:

What I see is that the authorization check (IsInRole) of the PrincipalPermission is using the propagated transaction as ambient transaction to access the ASP.NET Security database. I do not want that, as this locks the tables in the ASP.NET Security database. Besides, it is conceptually wrong, as it is only an access permission check and totally unrelated to modifications done in the business database.

I understand that I can abandon the declaritive security model and programmatically make the IsInRole check using a new TransactionScope (using TransactionScopeOption.Suppress or TransactionScopeOption.RequiresNew when appropriate), but is it possible to achieve this while retaining the declarative security model?

  • 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-14T17:03:39+00:00Added an answer on May 14, 2026 at 5:03 pm

    Solution:

    I added ‘Enlist=false’ to the connection string to the SQL Security Database; in this way the connection shall not participate in the transaction context.

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

Sidebar

Related Questions

Implementing a web service that uses Transport-level security with WCF over HTTP is pretty
My WCF Service is complete with .NET 3.5 and I used wsHttpBinding while implementing
I'm currently implementing a service that uses WCF discovery and provides Discovery Endpoint and
I've got a client/server setup that I am implementing using a WCF Service (
I am implementing a WCF Data service that implements the following method: http://debugmode.net/2010/06/13/introduction-to-wcf-data-service-and-odata/ I've
I'm implementing a Silverlight application that uses WCF services heavily, I've got to the
I'm a bit lost concerning WCF Server authentication... I'm writing a WCF service that
I have a Web Service, Now I want to implement security model for that,
I have a wcf service that is secured using WIF. I'm implementing token caching
I am implementing a WCF service library. You add a new code file that

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.