Calling Windows Services from a Remote Computer

I am going to encode the Windows service to add users to the computer (users without rights, that is, only for authentication). (As a note, I plan to use this method .)

I want to be able to call this Windows service from another computer.

How it's done? Is this a high order? Would I be better off creating a web service and hosting it in IIS?

I have some WCF services hosted in IIS on the calling computer (they will make a call to the proposed Windows service). I found that hosting in IIS is somewhat problematic, so I would prefer not to have a second instance of IIS for management, if only I need it.

(I will use Visual Studio 2008 Service Pack 1, C #, and Windows Server 2003 (for both the host and the host).

thanks for the help

+3
source share
6 answers

If you are thinking of hosting a web service in IIS only to communicate with an NT service on the same machine, this is definitely more of a problem than it costs in this case.

As pointed out in other answers, you can make the WCF service with the necessary operations and place them in the same NT service that you want to interact with. You can easily provide this with certificates or user accounts to make sure that they are controlled only by the right people / machines.

NT-, , sc.exe , , , NT- .

NT WCF . , Net User (, - ) AddUsers (. Kb 199878/en-us). "" , - . , . .

, , NT- IIS , , , . , , , " ", .

: net user , . pspasswd, PsExec , .

+3

WCF Windows. .

+2

WCF Windows. TCP (NetTcpBinding class). , WCF, , .

, " Windows"

+2

Windows , .

, , , , (, sc) ( ).

; , -, ..

+1

WCF Windows. Windows, , ServiceHost <T> . WCF, IIS, , TCP, Named Pipes WsHttp. , , , .

+1

You can create a WCF service that will talk to your Windows service in a remote window. The WCF component node in IIS (or, as you would like, that you could exchange data with it), and then call the WCF component from a remote computer.

0
source

Source: https://habr.com/ru/post/1711750/


All Articles