C# 2010 standard output
-
In a C# desktop 2010 application that I need to write, I will be calling a web service. I have been using batch command prompts to save the output to a text file. The commands I have been running in the dos window look like the following: cmd1 > file1. Basically the output shows in a dos window and > makes the data displayed in the dos window go to the standard ouput. My questions are the following: 1. Since I have been using the redirection symbol, the web service must be writing the output to 'standard output' location. However I do not know what the 'standard output' is in a C# 2010 and how to access the 'standard output'. Thus can you tell me what the standard output is and how to access it in a C# 2010 application? 2. Can you tell me how to have information not be displayed in a dos popup window and go to eh location i specify?
-
In a C# desktop 2010 application that I need to write, I will be calling a web service. I have been using batch command prompts to save the output to a text file. The commands I have been running in the dos window look like the following: cmd1 > file1. Basically the output shows in a dos window and > makes the data displayed in the dos window go to the standard ouput. My questions are the following: 1. Since I have been using the redirection symbol, the web service must be writing the output to 'standard output' location. However I do not know what the 'standard output' is in a C# 2010 and how to access the 'standard output'. Thus can you tell me what the standard output is and how to access it in a C# 2010 application? 2. Can you tell me how to have information not be displayed in a dos popup window and go to eh location i specify?
-
In a C# desktop 2010 application that I need to write, I will be calling a web service. I have been using batch command prompts to save the output to a text file. The commands I have been running in the dos window look like the following: cmd1 > file1. Basically the output shows in a dos window and > makes the data displayed in the dos window go to the standard ouput. My questions are the following: 1. Since I have been using the redirection symbol, the web service must be writing the output to 'standard output' location. However I do not know what the 'standard output' is in a C# 2010 and how to access the 'standard output'. Thus can you tell me what the standard output is and how to access it in a C# 2010 application? 2. Can you tell me how to have information not be displayed in a dos popup window and go to eh location i specify?
sc steinhayse wrote:
the web service must be writing the output to 'standard output'
Wrong. The web service has no access to the client streams at all. It's your "cmd1" executable that is writing the data to standard output, not the web service.
sc steinhayse wrote:
2. Can you tell me how to have information not be displayed in a dos popup window and go to eh location i specify?
That depends on your "cmd1" code. All you need to do is grab a path specified on the command line, open the file specified by the path, and write the data to that instead of outputting it to the console. An example of your command line would be:
cmd1 C:\\somepath\\somefile.txt
If you don't know how to get command line parameters or open a file and write to it, you've got some research to do on the basics of C# and the .NET Framework. Such as this[^] and this[^]
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
sc steinhayse wrote:
the web service must be writing the output to 'standard output'
Wrong. The web service has no access to the client streams at all. It's your "cmd1" executable that is writing the data to standard output, not the web service.
sc steinhayse wrote:
2. Can you tell me how to have information not be displayed in a dos popup window and go to eh location i specify?
That depends on your "cmd1" code. All you need to do is grab a path specified on the command line, open the file specified by the path, and write the data to that instead of outputting it to the console. An example of your command line would be:
cmd1 C:\\somepath\\somefile.txt
If you don't know how to get command line parameters or open a file and write to it, you've got some research to do on the basics of C# and the .NET Framework. Such as this[^] and this[^]
A guide to posting questions on CodeProject[^]
Dave KreskowiakI do not know how to make the C# application use the command line arguments I pass to it. My command line looks like the following:
Start .\samclt\bin\Debug\samcl.exe encrypted_value https://test/test/testWebService 1 ITEM
I know the application is not using the parameters that appear after the exe by stepping though the code. Thus can can you tell me how to make the application see the parameters I am trying to pass to it?
-
I do not know how to make the C# application use the command line arguments I pass to it. My command line looks like the following:
Start .\samclt\bin\Debug\samcl.exe encrypted_value https://test/test/testWebService 1 ITEM
I know the application is not using the parameters that appear after the exe by stepping though the code. Thus can can you tell me how to make the application see the parameters I am trying to pass to it?
I already showed you in the links at the bottom of my previous post.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak