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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:16:31+00:00 2026-06-16T01:16:31+00:00

I have some code that is running in an ASP.NET application that runs a

  • 0

I have some code that is running in an ASP.NET application that runs a command line process that uses PSCP.EXE (Putty) to copy a file from an external Linux server to the local server. When I run the ASP.NET application interactively by using the Run command in Visual Studio 2010 it works fine. However, when I deploy the application to IIS (on the same server!) and try to run it I get an error coming back from the PSCP.EXE command line. The error is this:

Fatal: Network error: Connection timed out

I did a little research about that PSCP.EXE error and the only thing I found was people suggesting that the port needed to be specified. But I don’t think that would apply to me since it works fine when I run the app through Visual Studio.

Does anyone know why I would get a connection timed out error when running the command from IIS 7 on my box, but when I run it through Visual Studio on the same box it works fine?

Here is my code:

string _pscpExePath = ConfigurationManager.AppSettings["PSCPExePath"];
string _localOptionsFolder = ConfigurationManager.AppSettings["LocalOptionsFileFolder"];
string _remoteOptionsLocation = ConfigurationManager.AppSettings["RemoteOptionsFileLocation"];

ProcessStartInfo _procStartInfo = new ProcessStartInfo("cmd", "/c " + _pscpExePath + " -pw " + App.ConfigData.ModemAdminPassword + " root@" + App.ConfigData.ModemIPAddress + ":" + _remoteOptionsLocation + " " + _localOptionsFolder);
_procStartInfo.RedirectStandardOutput = true;
_procStartInfo.RedirectStandardError = true;
_procStartInfo.UseShellExecute = false;
_procStartInfo.CreateNoWindow = true;

using (Process _proc = Process.Start(_procStartInfo))
{
  using (StreamReader _reader = _proc.StandardOutput)
  {
    string _result = _reader.ReadToEnd();
    log.Info("Get Options File Result = " + _result);
  }

  using (StreamReader _error = _proc.StandardError)
  {
    string _result = _error.ReadToEnd();
    log.Info("Get Options File Error = " + _result);
  }
}
  • 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-16T01:16:33+00:00Added an answer on June 16, 2026 at 1:16 am

    Looks like I was mistaken. There was a different reason that the IIS site was unable to connect to the linux server. Everything is working properly now. This question can be marked as answered and could even be removed as it really wasn’t an issue with the code or anything.

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

Sidebar

Related Questions

We have an ASP.NET application that queues some of its long-running operations (generating reports,
I have some code that attempts to test whether my application is running with
I have some VBA code that needs to talk to a running c# application.
I have an Asp.Net application that calls some WCF service using a proxy generated
We have an ASP.NET MVC 4 application that links to legacy native code. The
I have an ASP.Net application that performs some database initialization during Application_Start in Global.asax.
We have an existing ASP.NET application (WebForms) that uses home-grown authentication. We've been tasked
I have an asp.net application that requires some editing of the machine.config file in
I have some debugging code that if executed while running with GBD attached should
I have some jQuery code that is having difficulty running because I'm using it

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.