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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:48:00+00:00 2026-06-07T19:48:00+00:00

I am currently working on a project that contains a WCF service, a Windows

  • 0

I am currently working on a project that contains a WCF service, a Windows service and a WPF application. The Windows service communicates with the WCF, and under a certain circumstance, must launch the WPF application for the user to receive messages. (WCF is on a remote server, the rest is on the client). I’ve hit a bit of a snag with the launch. I have the services writing messages to the application logs so that I can somewhat ‘debug’ along the way. The Windows service runs the following code with no problems.

C# code, Windows Service:

WriteLog.WriteString("PostOffice.MessagesWaiting: Inside, starting up.", EventLogEntryType.Warning);
// Call the WPF Application
var messagingProcess = new Process();
var messageProcessStartInfo = new ProcessStartInfo(@"""C:\GoldenEyeMessages.exe""");
messageProcessStartInfo.CreateNoWindow = false;
messageProcessStartInfo.UseShellExecute = false;
messageProcessStartInfo.FileName = @"""C:\GoldenEyeMessages.exe""";
messageProcessStartInfo.WindowStyle = ProcessWindowStyle.Normal;
messageProcessStartInfo.Verb = "runas";

messageProcessStartInfo.RedirectStandardOutput = true;
messagingProcess.StartInfo = messageProcessStartInfo;
messagingProcess.Start();
StreamReader daStreamReaderMan = messagingProcess.StandardOutput;
string newString = daStreamReaderMan.ReadLine();

WriteLog.WriteString("PostOffice.MessagesWaiting: The Eagle has landed.", EventLogEntryType.Warning);

The WPF application doesn’t execute in the current user’s session. Instead, I get a popup to view the message. Here is a picture of it:

enter image description here

Once selecting the ‘View the message’ option, it of course switches me to a different session and then runs the WPF application.

My question is, how should I go about getting the WPF application to launch within the current user’s session, or the ‘active’ session?

  • 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-06-07T19:48:01+00:00Added an answer on June 7, 2026 at 7:48 pm

    You are getting this because the user that is trying the launch the WPF executable does not have permission to interact with the desktop.

    Windows Services typically do not run under an account with that permission, and it is considered a security vulnerability to do so.

    In most cases, it is recommended that you not change the Allow service to interact with desktop setting. If you allow the service to interact with the desktop, any information that the service displays on the desktop will also be displayed on an interactive user’s desktop. A malicious user could then take control of the service or attack it from the interactive desktop.

    http://technet.microsoft.com/en-us/library/cc782435(v=ws.10).aspx

    A more secure alternative would be to have the WPF application always run in the system tray and arrange a mechanism for the Windows Service to signal the WPF application that a message needs to be shown. One simple mechanism is to write a file to an agreed location and use a file watcher in the WPF app to look for that file (and delete it after displaying). Note that the windows service might be running long before a user logs in (so long before the WPF app is running), so whatever notification mechanism you use needs to allow for messages to accumulate and be displayed at once after login.

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

Sidebar

Related Questions

I'm currently working on a project that is building a java-based desktop application to
I am currently working on a project which contains a window, that has a
Currently I am working on a python project that contains sub modules and uses
I'm currently working on a project that contains many different Eclipse projects referencing each
I am currently working on a project that lets users post comments with jquery
I am currently working on a project that is accessing a piece of hardware
I'm currently working on a project that has a svn repository. I'm used to
I'm currently working on a project that has a sizable amount of both client
I am currently working on a project that is using Dojo as the js
Currently am working on a project that requires me to create some XML for

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.