|
|
You should be able to create a folder with Plesk and set write access for anonymous users to it (like a folder for file upload or temporary files), e.g. somewhere in the folder for your html pages. Then you can write the backup file there, and retrieve it afterwards with http or Plesk.
|
|
|
|
|
That is is exactly what I did I asked the ISP to create folder for me to write to have have FTP access to and it works fine. Thanks
|
|
|
|
|
I am going to write a C# 2010 console application that executes another console application. This new application will send sequential commands to the console application based upon values stored in a sql server database.
I would like to know how I would debug (step through code)? Can I put a break point in the new console application and a breakpoint in the old console application (C# 2008)? Basically the new console application will run and call the second console application executing the command in the process class. Will the debugger then catch the breakpoint in the exisitng console application and the new console application? Do I need to point both console applications in the same directory path? Basically can you tell me how I would debug these two C# applications?
|
|
|
|
|
This sounds like an architectural nightmare to me. What exactly are you trying to achieve with this? Is this something that you could achieve with PowerShell instead? Why do you need two console applications?
|
|
|
|
|
The following is in response to your questions:
1. What is powershell?
2. The purpose of the application is the following;
a. there is an existing console application that calls a web service. The current console app takes in various paramters to call the web service to obtain different data.
b. I am planning on the second console application calling the first console application with various sequence of commands to call.
baiscally the first console application was only setup to call a web service based upon the method number that was called.
Now i writing the second console application to call the first console application with the mehtod numbers in specific sequences.
|
|
|
|
|
dcof wrote: a. there is an existing console application that calls a web service. The
current console app takes in various paramters to call the web service to obtain
different data.
As you don't have the code for the first console application, you can't set a breakpoint in it - full stop. If you have a pdb file, you can potentially step in then, but that's it.
dcof wrote: 1. What is powershell?
This[^]
|
|
|
|
|
If the two applications are in two seperate solutions, you would need to have two copies of Visual Studio open. One to run your second project that is launching the first. You can set breakpoints in that and monitor the execution of that code.
The second one would need the debugger attached to the instance of your first console application, but can only be done AFTER it was launched. Why? Because Visual Studio is not lauching the application and therefor has no idea its even running.
I would suggest you forget doing dual-debugging for now since you don't appear to have the skill set to handle this.
Normally, you would debug the console app your code is launching seperately, using test command line parameters so you can test every little corner of your app. These command line parameters are easily supplied in the Project Properties, Debug tab of your project.
|
|
|
|
|
I just want to make certain the new console application is calling the original console application. Do you have other suggestions on how i can accomplsih my goal?
|
|
|
|
|
If you want to see if the thing launched, all you do is look in Task Manager (Ctrl-Shift-Esc) to see it when it's launched!
|
|
|
|
|
I want to write a C# 2010 application that executes a console application. This new application will send seqential commands to the console application based upon values stored in a sql server database. This new application will wait for one command to finish before the next command is executed. The commands will look like the following:
Start .\bin\Release\sample.exe parameter1 parameter2 parameter3
Due to the facts listed above, I have the following questions to ask you:
1. What type of a C# 2010 application would you set up to call the console application?
2. In this application, what would I do to make the commands get executed? Right now I type commands like I listed above in a dos command window. Do I need to add a reference to the sample.exe, do I need to obtain dll files?
Basically how would I make these commands get executed in the C# 2010 application?
|
|
|
|
|
dcof wrote: 1. What type of a C# 2010 application would you set up to call the console application?
Depends on "who" is running it. If there's no user, I'd go for a windows-service, based on the argument that your input is coming from a service. A console-app would do fine too; could be started on login, or as a service (using a tool), or using the task-scheduler.
dcof wrote: 2. In this application, what would I do to make the commands get executed?
Use the <a href="http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx">Start</a>[<a href="http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx" target="_blank" title="New Window">^</a>] method of the Process class, or one of the overloads.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I have not used C# 2010 in anger but I should imagine that the methods are quite similar or the same as 2008 to make a command line call from C# I have used:
System.Diagnostics.Process.Start(@"Test.bat");
which requires the
using System.Runtime.InteropServices;
I have used a batch file in the example the as that what I used in the code but any dos command should work.
|
|
|
|
|
glennPattonWork wrote: which requires the
using System.Runtime.InteropServices;
Which is a wrong statement. The System.Diagnostics.Process class is located in the System.dll assembly and does not require any other namespace/assembly.
|
|
|
|
|
Mmmm, that's what I thought but as the dang thing didn't run and seemed to lock up and fall flat on it's face around the dos call but worked when I added the using statement I was under the impression that it had something to do with it!
Glenn
|
|
|
|
|
|
What is the benefit of using a process communicator when I can write the code in a console application?
|
|
|
|
|
dcof wrote: I can write the code in a console application
I have no idea what you mean by that. The ProcessCommunicator is for interacting with an existing console application in a programmatic way and it can be automated with the CommScript. I believe these will help you accomplish what you stated in your posts.
In your app, app instantiate a ProcessCommunicator to execute the existing console application so you can interact with it.
And you may want to instantiate a CommScript to control it.
Read the articles.
|
|
|
|
|
dcof wrote: I want to write a C# 2010 application that executes a console application....
That is about what the application does.
dcof wrote: 1. What type of a C# 2010 application would you set up to call the console
application?
That is about how the application is used. And you have provided no information about that at all.
|
|
|
|
|
Hi All,
I am try to make a program user proof (though but...) I have now got it to find the device plugged in at initial run time, it runs fine on talking to one device, closes the comm port, changes the comm port, reopens the comm port. I am trying to do this by
nameArray = SerialPort.GetPortNames();
do
{
index += 1;
cboPort.Items.Add(nameArray[index]);
}
while (!((nameArray[index] == myComPortName) || (index == nameArray.GetUpperBound(0))));
While this works fine on initial set up, it appears to work on subsequent runs but after the fourth or so run it comes up with an error mostly due I think to the fact that I am setting the serial port property with out touching the rest. <<test it="">> Well tried that did <> didn't work, I am now thinking I am trying to reassign a com port that is in use but I closed it so I should be able to??? Have I fallen foul of a security feature?
Glenn
Glenn
|
|
|
|
|
..not what you'd call a solution, but might help;
Try to put the serial-port logic in a separate console-app, and call it with the port as a parameter. If the app exits, the port "should" be free, whether you closed it nicely or not.
I hope someone else can do better
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for that, tried something like that before didn't go to well, but will give it a go
tomorrow. My understanding of the serial port class was that you could do it my way.
Glenn
|
|
|
|
|
How to extract the form of a c# FILE
|
|
|
|
|
|
I'm not sure what you want to do!
Are you talking about an .cs file?
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|