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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:24:59+00:00 2026-05-14T06:24:59+00:00

I have the following scenario: I have various user’s data stored in my database.

  • 0

I have the following scenario:

  • I have various user’s data stored in my database.
  • This data was entered via a web app.
  • We’d like to expose this data back to the user over a web service so that they can integrate their data with their applications.
  • We would also like to expose some business logic over these services. As such we do not want to use OData.
  • This is a multi-tenant application so I only want to expose their data back to them and not other users. Likewise, the business logic we expose should be relative to the authenticated user.

I would like let the user use an OASIS scheme to authenticate with the web service — WCF already allows for this out of the box as far as I understand — or perhaps we can issue them certificates to authenticate with. That bit hasn’t really been worked out yet.

Here is a bit of pseudo-code of how I envision this would work within the service:

function GetUsersData(id) 
 var user := Lookup User based on Username from Auth Context
 var data := Get Data From Repository based on "user"
 return data
end function

For the business logic scenario I think it would look something like this:

function PerformBusinessLogic(someData)
 var user := Lookup User based on Username from Auth Context
 var returnValue := Perform some logic based on supplied data
 return returnValue
end function

The hard bit here is getting the current username (or cert info in the cert scenario) that the user authenticated with!

Does WCF even enable this scenario? If not would WSE3 enable this?

Thanks,

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

    Shouldn’t really be too hard, I think:

    • if your users authenticated with a Windows user credential at your WCF service, you’ll be able to find their credentials under

      ServiceSecurityContext.Current.WindowsIdentity
      
    • if your users authenticated with a certificate, you’ll find their identity (which is going to be a CertificateIdentity instead of a WindowsIdentity) under

      ServiceSecurityContext.Current.PrimaryIdentity
      

    Given a Windows identity, you can also impersonate that caller for subsequent calls down into your business or data layers, if needed – check out the MSDN docs Delegation and Impersonation with WCF, or Google or Bing for “WCF Impersonation” should give you a truckload of valuable links on that topic.

    If neither the Windows nor the certificate path work for you, WCF also enables you to create your own custom authentication scheme, in which case you’d need to write an extension for WCF, plug it in, and you’d get username/password of your calling users sent to you to validate against any kind of custom store you might have.

    WCF gives you a lot of flexibility in many ways – I highly doubt you’ll find a scenario that works in WSE3 but doesn’t work equally well (or better) in WCF!

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

Sidebar

Related Questions

I have the following scenario: I have a database with a particular MyISAM table
I have following Scenario: PHP(Server, Writer) ----> MySQL Database <------ PHP(Client, Reader/ Writer); PHPS
Let's assume we have the following generic scenario: An RDBMS as a data source,
I have the following scenario I have a main form as MDI parent and
Due to company constraints out of my control, I have the following scenario: A
I want to accomplish the following scenario in Drupal: You have 2 content-types. Lets
How could I best implement the following scenario? I have a Next Period... button
Hi I need some help with the following scenario in php. I have a
I have following situation: I have loged user, standard authentication with DB table $authAdapter
we have the following scenario: * a .NET application allows users to upload documents.

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.