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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:57:26+00:00 2026-05-11T23:57:26+00:00

Hi I want to create a WCF service that have login method, which is

  • 0

Hi
I want to create a WCF service that have login method, which is authenticating and giving user roles, and depending to that roles, allow or disallow user to call other service methods. Which is the best way to do that? Is there WCF standart mechanism to achieve this?
Thanks a lot!

  • 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-11T23:57:26+00:00Added an answer on May 11, 2026 at 11:57 pm

    Basically you don’t. Returning a ticket from a login method isn’t safe, what’s to stop an application editing it and sending a faked version with each subsequent request. Yes you could sign it, but then you’re sending something rather large.

    Instead simply require a username/password combination each time, and use the standard authentication and authorization bits, and role based CAS to check and limit based on role.

    WCF already provides everything needed to use message based security and require a username and password with each request – and that’s a standard SOAP function. Plug in an authentication provider (easy if you’re already using the ASP.NET membership functions), then plug in roles (again easy if you’re using the ASP.NET bits – otherwise roll your own

    Once you have a role based principal you can use declarative permission demands

    [PrincipalPermission(SecurityAction.Demand, Role = "Administrators")] 
    

    on methods you want to protect, or even entire classes.

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

Sidebar

Related Questions

I want to create a WCF RESTful service method that can receive an arbitrary
I have a WCF Service Using MSMQ hosted on IIS. I want to create
I want create wordpress website into which I want create user management... That means
I have to create a WCF service that handles following tasks: Register the notification
I want to create an autogenerated proxy for WCF service that allows me to
I have a WCF Service that exposes a method GetCustomers(). The internals of the
I need to create a WCF Service that will have a download file function.
I've successfully created a WCF service that works how I want it to. The
I want to create WCF service and client. I want to add 2 way
I want to create new WCF service and client. The 2 parties will communicate

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.