I have a csharp app running in my customer's server. The app is a Windows Service.
I want to be able to tell if app is running, if it is stopped and lastly I want to be able to restart it. Everthing must be done from a web client app.
Because access from external networks to this machine is restricted by my customer, I was thinking about implementing an "Agent Client", which will be just another Windows Service running locally and that could execute the "restart" and "stop" commands. It would be pulling an external "Agent Server" to find out if commands need to be executed.
What do you think about this? Any better ideas?
Thanks a lot!
designing Client Server Application in C#
I'm developing an application for copying and creating files between local network shares in 1 GB connection. This application will run on a local machine with that connection.
Now I have to introduce a Client-Server connection in a way that the User can perform the same steps from his Home PC. For that reason I have to setup a Server on the local machine which has 1GB connection to the network shares and access that server application from Home to perform the same actions as the User is on his local workspace.
Once again I want to clarify that the application now is running well on a local PC with 1 GB connection. I want to reach as much as possible to that via with the Client-Server. And once again, I'm not copying files from the Client to the Server or anything like that. It is only interaction between the local shares. So I want to be able to perform a copy function from local/share1/folder1 to local/share1/folder2 from the Home PC.
I'm new to Client-Server applications. And I have no idea how to set up that. Any recommendations/suggestions are welcome. My current application is developed in C# Visual Studio, so I believe that I should better use .NET Remoting or some other already supported by Visual Studio. All I could find on the internet is how to set-up a client server application for chat, I see nothing similar to my case.
Any design decisions or code will be really helpful at this moment.
There is no need to attach snippets of my code (I guess), because the application is already running locally and I don't have to change it.
Thanks in advance!
Im looking at creating a service on a remote server that a win forms app can communicate with. (Where the forms app is running locally on user machines).
The service can either run in IIS (7.5) or as a windows service, but essentially I need to be able to call the service from the forms app and then have a stream of progress sent back to the forms app from the service, much like you would output to a Console window.
I've looked into using WCF which seems ideal except I couldn't find out whether I can relay progress updates back to the forms app. Also SignalR running as a self hosted windows service seems to be an option but might be overkill?
We'll be running the forms app on win7 and the remote server will be running server 2008.
Are you able to advise best routes to go down for this and if possible some examples or tutorial links?
Many thanks :-)
If you are looking for the application to relay back to the server for progress, seems you are looking for something like this:
WCF Duplex
It basicly enable you to call bi-directional function using open socket.
Hope it helps.
Thanks,
Amir
My motive is to to execute a program (e.g. winword which is installed on a server) at a client machine. And also the end user should not know the program is running form a remote machine i.e. end user just click on a button and the program get executed without asking any credentials.
Please help me how can i achieve this target.
Thanks in advance.
See http://csharp.net-informations.com/remoting/run-remote-application.htm
I hope it will help you a lot.
It sounds like you want to run the application over Remote Desktop using Seamless Windows, called RemoteApp on Windows Server 2008.
As a starting point, check out this article: Terminal Services RemoteApp (TS RemoteApp)
Are there situations that we should use a windows service ?
I am building a client-server project (c#) and the server supposed to work alone without any user so someone advised me to use a windows service to run the server, is this right ? or there are a better solutions ?
Windows services are normally used when an application needs to continuously run. For example if they need to:
Wait for incoming requests. (Like through remoting or wcf)
Monitor a queue, file system etc.
If a program just needs to run periodically, like once a day. It is normally easier to create a scheduled task.
In your situation I would use a service for the following reasons:
You don't need to have a session running. This is good for security, and also reduces overhead on the server.
You get some of the managment commands built in for free
Start
Stop
Pause
Continue
You can handle server events such as shutdown.
Windows service can start running as soon as the machine is powered up, which makes ideal for running as a server, http server for example. No one is required to login.
You should create a Windows Service to run code in the background, without user interaction.
For example, a Windows Service will run even if no-one is logged on.
Any server that accepts connections (such as a mail, web, or FTP server) should usually be a Windows Service.
Well, a Windows Service provides a full framework for your application to work and to remain active while you want it to, so I think its ok.
Windows services are the right thing to use for something that should run all of the time, whether or not a user is logged in.
If you need something to run without an active user logged in, you need to use a windows service.
When you need the application to start running even when no one has physically logged into the machine, which is common with server machines, a service is a good candidate in this case. Especially because the service can be configured to auto start, which means the service will start when the machine is rebooted withut human intervention.
If however you are wanting to host web services (WCF) while a service is an option, you might consider hosting in IIS, this relieves you of writing the actual hosting code etc.