Re: shutdown server on a lan
:wave:
Yep. the way I did it one time was to simply have a service that was installed on the local server that I wanted to shut down. There's a command you can run that tells the server to shut down. I don't remember what it was - you'll have to look that up - but it had parameters associated with it so you could tell what kind of shutdown to do. Maybe somebody else here knows the exact command.
Anyway, I had .net 2003 front end that communicated with the service using .net remoting. I actually had several servers that were configured this way and all were controlled by one central app. .net remoting is not too complicated once you figure it out, and there's plenty of good documentation out there.
That's the really high level view of the solution.
Re: shutdown server on a lan
Thanks D
You mentioned a service, do you remeber by any chance what kind of service.
thanks a bunch
Re: shutdown server on a lan
Doesn't shutdown.exe work?
If worse comes to worse, just make a little winsock app that sits in the background listening on a certain port waiting for a specific password. If you're worried about security, make it the day's date x 2 for each day month and year or something. I'm sure you could be more creative then that though.
Re: shutdown server on a lan
When I say a service I mean use .net to build your own custom service to listen and do the work for you. Windows service is one of the project types available for .net.
When you create this service, all you'll need is a public method that shuts down the server. This method, in turn, will be accessed as a remote object from your controlling front end. It will be accessed through .net remoting. So, you could almost think of this new service that you will create as an object library that sits on a remote server.
Do some reading in the MSDN or online about .net remoting and they will talk about using a service as the remote object. You'll quickly get the picture. :thumb:
Re: shutdown server on a lan
BTW, shutdown.exe may be the command you need to use. It seems I used a method in the .net framework somewhere to do my shutdown, but I may be completely wrong.