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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:19:58+00:00 2026-05-15T11:19:58+00:00

I have a web application that accesses a database through a wcf service. The

  • 0

I have a web application that accesses a database through a wcf service. The idea is to abstract the data from the web application using the wcf service. All that works fine but I am also using the built in roleprovider using the SqlRoleManager which does access the aspnetdb database directly. I would like to abstract the roleprovider by creating a custom roleprovider in a wcf service and then accessing it through the wcf service.

I have created the custom role provider and it works fine but now I need to place it in a wcf service.

So before I jump headlong into trying to get this to work through the WCF service, I created a second class in the web application that accessed the roleprovider class and changed my web config roleprovider parameters to use that class. So my roleprovider class is called, “UcfCstRoleProvider” and my web.config looks like this:

    <roleManager 
    enabled="true" 
    defaultProvider="UcfCstRoleProvider">
  <providers>
    <add 
        name="UcfCstRoleProvider" 
        type="Ucf.Security.Wcf.WebTests.UcfCstRoleProvider, Ucf.Security.Wcf.WebTests" 
        connectionStringName="SqlRoleManagerConnection" 
        applicationName="SMTP" />
  </providers>
</roleManager>

My class starts like this:

    public class UcfCstRoleProvider : RoleProvider
{
    private readonly WindowsTokenRoleProvider _roleProxy = new WindowsTokenRoleProvider();

    public override string ApplicationName
    {
        get
        {
            return _roleProxy.ApplicationName;
        }
        set
        {
            _roleProxy.ApplicationName = value;
        }
    }

As I said, this works fine. So the second class is called BlRoleProvider that has identical properties and parameters as the roleprovide but does not implement RoleProvider. I changed the web.config to point to this class like this:

    <roleManager 
    enabled="true" 
    defaultProvider="BlRoleProvider">
  <providers>
    <add 
        name="UcfCstRoleProvider" 
        type="Ucf.Security.Wcf.WebTests.BlRoleProvider, Ucf.Security.Wcf.WebTests" 
        connectionStringName="SqlRoleManagerConnection" 
        applicationName="SMTP" />
  </providers>
</roleManager>

But I get this error.
“Provider must implement the class ‘System.Web.Security.RoleProvider’.”

I hope I have explained well enough to show what I am trying to do. If I can get the roleprovider to work through another class in the same application, I am sure it will work through the WCF service but how do I get past this error?

Or maybe I took a wrong turn and there is a better way to do what I want to do??

  • 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-15T11:19:59+00:00Added an answer on May 15, 2026 at 11:19 am

    I think your best bet is to create a custom role provider and implement each method. In the implementation of each method, call the WCF service to do the data access. Eg:

    public class WcfRoleProvider: RoleProvider
    {
        public bool IsUserInRole(string username, roleName)
        {
            bool result = false;
            using(WcfRoleService roleService = new WcfRoleService())
            {
                result = roleService.IsUserInRole(username, roleName);
            }
    
            return result;
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have a Python application in the bottle web-server that accesses a C shared-object
I have a Web Application that use Hibernate 3.0. When I restart my database
I have an ASP.Net 4.0 web application which very frequently loads data from the
I have a C# Windows Service and an ASP.NET 4.0 web application that are,
I have a web application that using Struts + Spring + Hibernate . In
I have a web service that is quite heavy on database access. It works
I have a web-app-database 3 tier server setup. Web requests data from app, and
I have a web application that allows users to enter search criteria and the
I have a web application that will be used on iPhones, and want to

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.