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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:48:25+00:00 2026-05-23T11:48:25+00:00

Why this code runs perfectly on my development computer (win7 32bit) and on target

  • 0

Why this code runs perfectly on my development computer (win7 32bit) and on target server(2008r2 64bit) as console app. But when I try to run it as a web service on the target server it does nothing. No error, nothing.

If I remove

exitMsg = proc.StandardOutput.ReadToEnd();

then it fail with error:

System.InvalidOperationException:
Process must exit before requested
information can be determined.

   [WebMethod]
    public string GetRunningProcesses()
    {
        ProcessStartInfo pInfo = new ProcessStartInfo();
        pInfo.FileName = @"E:\bin\PsList.exe";        
        pInfo.WindowStyle = ProcessWindowStyle.Hidden;
        pInfo.CreateNoWindow = true;
        pInfo.UseShellExecute = false;
        pInfo.RedirectStandardOutput = true;

        string exitMsg = "";
        int exitCode = 1;

        using (Process proc = Process.Start(pInfo))
        {
            exitMsg = proc.StandardOutput.ReadToEnd();
            proc.WaitForExit(1000);
            exitCode = proc.ExitCode;
        }

        return exitMsg;
    }

I think there must be something about user under which code runs. As web service this code runs under asp.net user and this might couses the problems.

Please advice me how to fix this. Thank you very much.

RESOLVED


The problem was with EULA dialog, which poped up but it was invisble due to ProcessStartInfo settings.
When I run PsList.exe via CMD under account which is also used for Application pool for this web service, I get prompted for an EULA agreement and after that everthing works fine.

The strange thing is that I have “pInfo.Arguments = “/accepteula”;” in my real code. This should prevent my probem, but it didn’t and I don’t know why.
If any of you knows why, please tell me.

Thank you very much for all the help. You are trully good peoples here.

  • 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-23T11:48:26+00:00Added an answer on May 23, 2026 at 11:48 am

    The problem was with EULA dialog, which poped up but it was invisble due to ProcessStartInfo settings.
    When I run PsList.exe via CMD under account which is also used for Application pool for this web service, I get prompted for an EULA agreement and after that everthing works fine.

    The strange thing is that I have “pInfo.Arguments = “/accepteula”;” in my real code. This should prevent my probem, but it didn’t and I don’t know why.
    If any of you knows why, please tell me.

    Thank you very much for all the help. You are trully good peoples here.

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

Sidebar

Related Questions

This code runs perfectly on Java but when I run this on Android platform,
This code produces a FileNotFoundException, but ultimately runs without issue: void ReadXml() { XmlSerializer
So this code runs in an asp.net app on Linux. The code calls one
i have this code than runs perfectly .. returns a true .. when tracing
i have developed an app that runs perfectly fine on the simulator but when
Am trying to run a selenium suite using this code which runs perfectly on
I have this code in Python which runs perfectly well. What it does is
On testing my application in Simulator, my app runs perfectly. But on the real
I have a C# Web app that runs perfectly fine in VS2010, but when
This code runs on my local RoR/Windows 7 (64-bit): sql = ActiveRecord::Base.connection() last_pk =

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.