views:

174

answers:

4

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

A: 

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

David Basarab
Remoting is largely obsolete.
Marc Gravell
A: 

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.

Marc Gravell
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"
This might help: http://www.leastprivilege.com/HttpCfgACLHelper.aspx
Marc Gravell
+2  A: 

System.IO.Pipes

Scott Evernden
+4  A: 

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