|
1) I can understand the licensing thing, but it would seem you still have to license the terminal servers now. It would also seem with 3000 employees you probably should be doing the type of license that pretty much lets you do what you want verse per seat. Anyway licensing is a pain.
2) If the application resides on a network server you only have one place to update it. Of course if one user is in the app you won't be able to update it unless you kill that users session.
3) this is a problem, but most likely your app shouldn't be connected to the database server the whole time, it should only connect when saving or selecting data.
Anyway, you have very valid issues.
Still going back to your original problem. The application running on the remote server is locking up. Are you sure the app is locking up or is it the remote connection. I use remote connects a lot and if the connection is bad or just slow things become un responsive really quickly. So it is a real possibilty that you don't have an issue with the app as much as a slow connection to the remote server. That is a whole different problem.
Ben
|
|
|
|
|
agian its a weird concept
the application is not running at the local level so there is no connection problems
if your connection to your session is bad then it still will not effect the session on the server
2ndly
the application is Winword.exe but it is full of custom macros and whatnot ( in my opionion it is poorly written)
HOWEVER i dont have athority to rewrite it but i do know that after about a year of dealling with it that the cure all fix is to remote control the user and kill the winword proccess ( it will then resawn)
|
|
|
|
|
Well, with the process class you can find the winword process and kill it.
There is a GetProcessesbyName that should return all the winword processes if you pass winword.exe into it.
Then in your foreach you can do the p.Kill();
So at that point you would just need to re-start the app.
Ben
|
|
|
|
|
i can already find it and kill it
the respawn is taken care of with something else
the triggering the find and kill is what i need
|
|
|
|
|
Well, not that this is a great solution, but since they are both running on the same box. You should be able to set up something like this:
The application in question writes out a datatime stamp to some file. The find and kill application checks after a few minutes if it still hasn't see anything from the app then it kills it. Now I know this is winword so maybe writing out that datetime will be hard, but you kind of need the application to regularly do something so you know it is there. If you are writing out to files, of course you need to make sure that you clean them up as well. Anyway, maybe not a great idea, but an idea.
Ben
|
|
|
|
|
not really an option the winword.exe goes directly to an oracle database that i dont have access to none of the files are saved on the sessions hdd
|
|
|
|
|
Ok, that is sort of what I thought. I did find one property in the process class that may help you. It is called Responding. Here is the MS help on it:
If a process has a user interface, the Responding property contacts the user interface to determine whether the process is responding to user input. If the interface does not respond immediately, the Responding property returns false. Use this property to determine whether the interface of the associated process has stopped responding.
If the process does not have a MainWindowHandle, this property returns
So I guess in that case you could have the other app always running and checking every so often to see if the winword has stopped responding. If after checking a few times it still isn't responding then kill it and relaunch.
Ben
|
|
|
|
|
Hi all am working on a small project for work
part of the proccess is killing a proccess that is hung and i seem to be haveing trouble getting it to work
i think i could probably get a better understanding if i knew how to list all the running proccess on a machine at any given time.
does anyone know of an example that does this?
|
|
|
|
|
|
System.Diagnostics.Process[] aProcesses = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process p in aProcesses)
{
textBox2.Text = textBox2.Text + p.ToString() + System.Environment.NewLine;
}
|
|
|
|
|
Yep that should do it.
Ben
|
|
|
|
|
any elegiant suggestion on how to remove the extra text that is given in the loop
the system.diagnositc bla bla (firefox)
i want it to just show up as firefox
|
|
|
|
|
There are a lot of properties in the Process class.
So instead of p.ToString()
Perhaps you could just do:
p.ProcessName
Ben
|
|
|
|
|
|
I have a text file associated with my application.
Anyone can open and write on this file.
But I dont want anyone to write,delete or read this file.
How can i make my application do this?
Suggestion in both C# or VB.Net appreciated.
Thank You!
X
|
|
|
|
|
Well you'd have to set the permissions on the file to not allow access, but since your application will be running with the permissions of the logged on user then how would it access it if the logged on user cannot?
|
|
|
|
|
Dear originSH and other users,
When i am running the program, the program is only able to access the file. But if the program is not running, then the user shouldnot be able to open it, delete or write.
Can we write a program to do so?
I am in doubt whether this task is a programming task or some window operation.
Thank You!
X
|
|
|
|
|
You can do this, but it won't do you ANY good at all. There is nothing to stop the user from just giving himself the rights to the file again (outside of your app) and opening it in something like Notepad. You can NOT stop this from happening.
|
|
|
|
|
You can't keep people from messing with your file. You can look at encrypting the contence or something like that. So then at least they shouldn't be able to change it. Or if they did change it you would know since there would be an error when trying to decrypt the file. They could still delete the file though.
Ben
|
|
|
|
|
Hi,
I've spent last hour of my work trying to make String.LastIndexOf(string character, int startIndex, int count) work. I know that it's friday afternoon etc... but still, Am I overworked or is it really a bug ??
just try :
<br />
int GetLastPostion(string input, string character)<br />
{<br />
return input.LastIndexOf(character, 0, input.Length);<br />
}<br />
crashes, even
<br />
input.LastIndexOf(character, 0, input.Length - 1);<br />
<br />
input.LastIndexOf(character, 0, input.Length - 2);<br />
crashes.
wtf ???
|
|
|
|
|
It just crashes? .. or is it giving you an error?
|
|
|
|
|
ArgumentutOfRangeException:
Count must be positive and count must refer to a location within the string/array/collection.
Parameter name: count
|
|
|
|
|
Just one more question:
Is it this call that is actually crashing or is it possible that this is returning a -1 (because string is not found) to a function where -1 is out of range?
EDIT:
From MSDN:
ArgumentOutOfRangeException:
count or startIndex is negative.
-or-
startIndex minus count specify a position that is not within this instance.
|
|
|
|
|
This is correct. You are asking it to start searching from the start of the string, but the method works from the end of the string. It has nothing to search for.
|
|
|
|
|
I think you mean that reading this line, give you an exception :"CrossThread...."
if this what u mean, u need to invoke the thread :
if(textBox.InvokeRequired)
{
textBox.Invoke(method);
}
|
|
|
|