+ Start a Discussion

streaming with .net app?

Has anyone been able to get the streaming API to work with a .net service?  


I've tried the library https://github.com/Oyatel/CometD.NET but am having difficulties with it.  Wanted to see if anyone had better luck.


I was able to get it to work with the java example on the devforce wiki, so i know it isn't my org,  i think that oyatel port has some issues...


So my solution for the POC is to create a java console app that gets launched by my c# service.  When the java app gets a notification it will forward the data via TCP to a port opened by the service.  Pretty hacky way to get it to work, but for a POC it works just fine. 


Has anyone been able to get the streaming API to work with a PHP? 


Saw your post on the Streaming board, replying here as well so that those searching will find the same answer. ;)


See https://github.com/Oyatel/CometD.NET for a .NET CometD client.


The browser's XSS protection may cause some entertainment.  The basic strategy would be to use a javascript client for the actual work.   One issue is obtaining the authenticated session identifier (SID), which requires the client to log into Salesforce.  The Streaming API requires that SID be placed in the HTTP Authentication header of the Cometd requests.  The javascript libraries all allow this, and you can use OAuth to log into Salesforce and use the OAuth token (which is the SID).  As I said, the XSS issues might prove challenging, but creative use of frameworks like http://easyxdm.net, may allow you to overcome these issues.

I know this thread is old, but hope this might help future users.
for the REST API, check out..  https://github.com/giacomelli/SalesforceSharp
for the Streaming API check out.. https://github.com/nthachus/CometD.NET

I tried the Oyatel one, and couldn't get it working with V29 of API.. it kept throwing an unknown client err.

I've used the streaming nthachus with  REST giacomelli in the same windows service.