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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:35:25+00:00 2026-05-25T16:35:25+00:00

I’m looking for a way to notify a running WPF application that a new

  • 0

I’m looking for a way to notify a running WPF application that a new Impersonated Windows user has been authenticated. I thought I could do this via WCF & NetNamedPipeBinding but the I’m unable to flow the Impersonated WindowsIdentity via a callback. My scenario is as follows:

WPF Client Authentication App (Authenticate User) -> WCF Windows Service (Do Somestuff & Notify via callback to any running apps that user has changed) -> WPF Running Apps (Get new WindowsIdentity via callback ServiceSecurityContext refresh app with new permissions based on IPrincipal)

I thought I could use Impersonation to impersonate the new authenticated user and use ServiceSecurityContext.Current to get the client app’s WindowsIdentity during the callback to the already running WPF apps but it doesn’t seem to be possible.

I’m essentially trying to do the following:

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/ee23ff54-80da-47f4-946d-5c2d77e81309

Any ideas on how I could notify an already running app of a new WindowsIdentity? Any advice would be appreciated.

  • 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-25T16:35:26+00:00Added an answer on May 25, 2026 at 4:35 pm

    So this couldn’t be accomplished with a callback but I was able to accomplish what I wanted via Delegation. I had to implement a WCF service on the target application and had the service in the middle (WCF Windows Service) make a call to the target app’s WCF service to notify/send it the WindowsIdentity.

    Middle Service:

    [OperationBehavior(Impersonation = ImpersonationOption.Required)]
    public void MyServiceMethod(){
        DoStuff();
        ServiceSecurityContext securityContext = ServiceSecurityContext.Current;
    
        using (securityContext.WindowsIdentity.Impersonate()) {
              EndpointAddress backendServiceAddress = new EndpointAddress("net.pipe://localhost/TargetAppService");
    
              ChannelFactory<IService> channelFactory = new ChannelFactory<IService>(new NetNamedPipeBinding(), backendServiceAddress);
              IService channel = channelFactory.CreateChannel();
    
              channel.SetIdentity();
        }
    }
    

    Target App’s Service:

        [OperationBehavior(Impersonation = ImpersonationOption.Allowed)]
        public void SetIdentity() {
            ServiceSecurityContext securityContext = ServiceSecurityContext.Current;
            if (securityContext != null && securityContext.WindowsIdentity != null) {
                Console.WriteLine("Identity's Username: "+securityContext.WindowsIdentity.Name);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from

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.