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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:51:02+00:00 2026-05-30T06:51:02+00:00

EDIT: I’ve decided to go for WCF Data Services as opposed to MVC3 Now

  • 0

EDIT: I’ve decided to go for WCF Data Services as opposed to MVC3

Now that I have decided to go for WCF Data Services – I need a way to authenticate and authorise users.

Have looked at setting up a SQLMembership DB, but am struggling to actually authenticate the users. My clients won’t be .NET applications – most likely will be an iPhone/Android app that will call the RESTFul WCF Data Service to get data…

  • 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-30T06:51:03+00:00Added an answer on May 30, 2026 at 6:51 am

    Authentication

    WCF Data Services allow for a variety of authentication options, as described on MSDN : Securing WCF Data Services. From the available methods, Windows authentication is the most secure, using either the NTLM or Kerberos mechanism. Due to the constraints on cross-platform availability, the most appropriate and secure authentication method that can be used is NTLM, as it is available on almost all current platforms: Android (from version 4.0 “Ice Cream Sandwich“), iOS, Linux, UNIX, Windows.

    Setting up Windows authentication for an OData service hosted on IIS means disabling Anonymous Access and enabling Integrated Windows authentication. A more detailed guide can be found at Odata and Windows Authentication.

    For a more fine-grained control of the users allowed to access the service, access can be granted or denied to both user roles/groups, as well as specific users, directly from the configuration file (i.e. web.config). The syntax for allowing access for a specific user is described below. For maximum security, it is advised to deny access to all users/groups, and then explicitly allow access, as required. The rules in between the authorization tags are taken in order (i.e. allowing user DOMAIN\user access takes precedence over the denial for all users)

       <authorization>   
          <allow users="DOMAIN\user"/>
          <-- Deny access to every other authenticated or anonymous user
          <deny users="*" />
          <deny users="?" />
       </authorization> 
    

    If the authorization tag is not explicitly defined in the configuration file, then IIS will authenticate and allow access for all connecting users that are recognized (in the Active Directory or local machine).

    Setting up Windows authentication in a cross-domain environment is possible, but requires either:

    • a trust to be established between the domains (so that IIS can authenticate external users), or
    • the same username/password combination to be present on both domains
      or
    • the client in the external domain authenticates with credentials
      valid for the server domain.

    The available options for such situations are described in more detail in this blog post.

    Impersonation

    In order to be able to log in to the database, and retrieve the desired data using the Windows Account credentials sent to the WCF Data Service, the service needs to impersonate the user. This can be done in either in code, or in configuration

    • In the configuration file (i.e. web.config), the following settings
      must be made:
       identity impersonate="true"
    
    • If it is not desired for the entire service to run under the
      credentials of the connecting user, impersonation can be set up
      programmatically, where needed, in the following way:

      lUser = TryCast(HttpContext.Current.User.Identity, WindowsIdentity)

      lUserContext = WindowsIdentity.Impersonate(lUser.Token)

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

Sidebar

Related Questions

Edit: For personn interested in a cleaner way to implemenent that, have a look
EDIT: Sorry about ellipsis that's not what I actually have. For declaring an array
EDIT: Link should work now, sorry for the trouble I have a text file
Edit: Translated I have a RSS-feed that i want to parse. It's a podcast
Edit: From another question I provided an answer that has links to a lot
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
EDIT What small things which are too easy to overlook do I need to
Edit: I have solved this by myself. See my answer below I have set
Edit: The below question was answered by this . I have a new updated
Edit: I'm looking for solution for this question now also with other programming languages.

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.