2

I have a .Net 3.0 application that needs to pass an integer to another program on the same machine. I was using a WCF service to do this, but ran into user rights issues when trying HOSTING the service on the local box. Any thoughts on how to accomplish this woudld be greatly appreciated.

Thanks,

Dave

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
user38349
  • 2,945
  • 9
  • 36
  • 47

5 Answers5

4

WCF is still the way to go here.

Generally, for inter-process communication on the same machine, you would use the named pipe channel. If you are not using this, I suggest you do and then determine what the error in hosting is.

If both programs have message loops that are being processed, and you are sending an integer, you could use a call to SendMessage through the P/Invoke layer as well, but that's only because you are sending data that is equal to or smaller than what SendMessage will allow. Larger messages will require something like WCF.

casperOne
  • 73,706
  • 19
  • 184
  • 253
2

System.IO.Pipes

Scott Evernden
  • 39,136
  • 15
  • 78
  • 84
0

WCF is the way to go. You should use NetNamedPipeBinding to secure in same machine communication.
More about WCFBindings https://msdn.microsoft.com/en-us/library/ms730879(v=vs.110).aspx

0

.NET Remoting is a way to pass messages between programs.

David Basarab
  • 72,212
  • 42
  • 129
  • 156
0

How were you hosting? Note that a non-admin program using http will need permissions to use the port (in http.sys). This is via netsh (Vista) or (IIRC) httpcfg (XP).

See here, for example.

Community
  • 1
  • 1
Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • This is where I ran into the problem. We are a XP managed environment and everyone is at min permissions. address="http://localhost:9571/ReplayCatcher" binding="basicHttpBinding" – user38349 Mar 03 '09 at 18:29