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

  • Home
  • SEARCH
  • 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 7611035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:33:54+00:00 2026-05-31T01:33:54+00:00

I have a service with windows authentication. Using the following code, I can get

  • 0

I have a service with windows authentication. Using the following code, I can get the Windows Identity of the user who (by using the client) consumes the service.

String currentUser = OperationContext.Current.ServiceSecurityContext.WindowsIdentity.Name;

The configuration in the server is:

<binding name="messageSecurity">
<security mode="Message">
<message clientCredentialType="Windows"/>
</security>
</binding>

I also read that in the server, it is using Kerberos for this to work.

Now, I am trying to understand its significance in our corporate network. In the office, users will be logging into their desktops using their active directory credentials. Our service is hosted in a windows server named “SERV1” .

  1. Is only users who have access (to login) to “SERV1” can access the service? Or all users who are able to login to the office network (suing active directory credentials) will be able to consume the service?

  2. Is there a way to ensure that only CIO approved applications will be accessing the service, keeping the service as windows authenticated?

  3. Does this authentication check happen for each service operation call or only for the first call?

  4. Is there any way the service will be able to know the windows credentials of the user?

Note: What I understand is WindowsAuthentication can be compared to a Membership provider – providing username and password from a centralized location. It can be compared to ASP.Net Membership Provider or Active Directory Membership Provider.

Further reading:

  1. ASP.NET Active Directory Membership Provider and SQL Profile Provider

  2. wcf data contracts authorization

  3. http://www.theserverside.net/tt/articles/showarticle.tss?id=ClaimsBasedSecurityModel

  • 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-31T01:33:56+00:00Added an answer on May 31, 2026 at 1:33 am

    Can only users who have access (to login) to “SERV1” access the service?

    Yes – that’s the point of using Windows credentials in a WCF service. Only users which have a domain account in that Active Directory domain (or a separate domain which has a bidirectional full-trust relationship with your domain) will be able to access the service.

    Or all users who are able to login to the office network (suing active directory credentials) will be able to consume the service?

    The WCF security boundary is the Active Directory Domain – not a particular server.

    Is there a way to ensure that only CIO approved applications will be accessing the service, keeping the service as windows authenticated?

    How are those “CIO-approved” applications different from others? WCF is accessed by accounts – typically user accounts. You can limit which accounts have access to your service (by e.g. requiring those accounts to be member of a given AD group or something). You cannot really “limit” based on applications (only if those applications use specific application-level accounts to access your WCF service)

    Does this authentication check happen for each service operation call or only for the first call?

    Depends on your service – if you use a per-call WCF service, then the check happens for each call. If you use a per-session WCF service with “security negotiation” turned on, then the check happens once at the beginning of the session and not anymore until the session ends.

    Is there any way the service will be able to know the windows credentials of the user?

    Yes – OperationContext.Current.ServiceSecurityContext.WindowsIdentity IS the Windows credentials (the Windows identity) used to call your service. It’s a lot more than just the user name…..

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

Sidebar

Related Questions

I have WCF service with Windows authentication. To identify client user on the service
We have a WCF (Windows Communication Foundation) client and service application. We're using Windows
I have a WCF service using BasicHttpBinding with Windows authentication. Most clients are domain
I have asmx web service(c#). I'm using Windows Authentication to access web service. Now
I'm currently have a selfhosted WCF REST service. Using WebHttpBinding and Windows authentication, is
We have created a WCF service hosted in a windows service that handles Authentication
I just tried to move a WCF service to windows authentication using this connection
I have a ASP 3.5 web forms app using windows authentication that needs to
We have the following setup for authenticating users. A wcf authentication service that is
I have an ASP.Net application that is using Windows Authentication and I have specified

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.