|
hi all
i was wondering if there was a way that i could make a C# front end to send unix commands to a remote server. We have a few things were we need to unlock files in a db or change a users password but the rest of the staff forgets what the commands are wand what to do.
i was wondering if i could just have it as a textbox for entering text then send the command to the session
thanks
Crash
|
|
|
|
|
C# is putty in your hands
If you can establish communications with the remote system I don't see why it wouldn't be possible.
only two letters away from being an asset
|
|
|
|
|
putty is a telnet program that supports ssh
i guess i should have asked if anyone knows how to telnet or ssh into a server useing C#
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
|
|
|
|
|
anyone or should i start a new tread?
|
|
|
|
|
Hi ,
I use MS Word in my project , i want to write the letter "b" to the 20. row and 40. column of Word Document. Can i make this process , can you help me ?
Good coding ,
Thanks
|
|
|
|
|
What you're looking for is word automation:
http://www.codeproject.com/csharp/Simple_Ms_Word_Automation.asp
http://www.c-sharpcorner.com/UploadFile/amrish_deep/WordAutomation05102007223934PM/WordAutomation.aspx
Gideon
|
|
|
|
|
Hi,
How do I the number of a particular month with its related numbers of days??
Regards
ma se
|
|
|
|
|
System.Globalization.GregorianCalendar.GetDaysInMonth(year, month)
only two letters away from being an asset
|
|
|
|
|
[rant] WTF is with that? I can't use a property of an object as an out parameter to a method call? OK, I suppose it's because properties are actually methods. Still, that sucks, IMO. [/rant]
Marc
|
|
|
|
|
hmmmm ya know i never thought of trying that!
I always assumed it had to be a field that was being passed through.
|
|
|
|
|
From the language specification:
When a formal parameter is an output parameter, the corresponding argument in a method invocation must consist of the keyword out followed by a variable-reference (§5.3.3) of the same type as the formal parameter.
|
|
|
|
|
Makes sense technically, but it's poor detail hiding.
I suppose "fixing" it would cause a performance hit.
|
|
|
|
|
Join the club, line forms to the right. I was in the same place about a year ago and had to choose between reflection games and using public variables. In retrospect I think the latter would've ended up sucking less.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Now that you've mentioned it, I have an irrational need for indexers to be passed as an out parameter. Gahhhhhh.
|
|
|
|
|
I am having a problem with a File Stream. I am using the following code:
//Get .RJB file
m_oZipFile = new ZipFile(new FileStream(l_szLocation, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite));
I hold onto the m_oZipFile until I close the XML editor (that I am building), I am closing the Stream as follows.
m_oZipFile.Close();
When I close the program I am not getting the File write access back. For example, if I have 2 of the XML editors open, once I close the one with Write access to the file, the other one does not gain the write access.
|
|
|
|
|
I have also tried doing the following:
m_oFileStreamTest = new FileStream(l_szLocation, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
m_oZipFile = new ZipFile(m_oFileStreamTest);
then to close
m_oZipFile.Close();
m_oFileStreamTest.Close();
m_oFileStreamTest = null;
m_oZipFile = null;
|
|
|
|
|
Hi,
you most close things in reverse order from opening them.
|
|
|
|
|
Is that not what I have done?
|
|
|
|
|
|
I have close things in the reverse order and i still get the same error. That being that write access is not given to the next open file.
|
|
|
|
|
These are some of the questions that need answered in order to debug:
What is ZipFile ?
if your class, show code; at the least the constructor, the Close method and any methods they may call. Provide proof that Close run up to its end.
if ZipFile is not your class, where did you get it ?
Does the problem exist outside your app:
- can you rename the file with Windows Explorer ?
- Can you delete the file ?
Try another file name. Does it work the first time ? and the second time ?
Any chance your previous EXE is still running (e.g. because one of the threads
is still running while not declared a background thread) ?
Any chance your app has another stream open on the same file ?
Why do you use FileMode.Open instead of Create ??
And why FileAccess.ReadWrite ? are you first reading then writing (hence
multiple streams...) ?? if so did you close all streams before closing the file ?
And why FileShare.ReadWrite ???? I must strongly advice against it. If you do
not absolutely need this, use None !
|
|
|
|
|
I think what Luc is trying to say is that you need to close the m_oFileStreamTest before closing the m_oZipFile .
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
You might want to try wrapping things in a using statement to ensure that the streams are being closed properly. It should look something like this:
using (FileStream m_oFileStreamTest = new FileStream(l_szLocation, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
{
using (ZipFile m_oZipFile = new ZipFile(m_oFileStreamTest))
{
}
}
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
I have a central database in a server computer(In sql express 2005).
Two or more computers can connect to the central database.When a terminal computer is doing some operation on some data, how can i ensure that the other terminal
in the same network doesnot change the data at the very same moment?
Help appreciated both in C# or VB.Net
X
|
|
|
|
|