none
How To Make WCF routing service log message to SQL server RRS feed

  • Question

  • Hi,

    I'm trying to use Routing Service to route the data from clients to other end points, the thing is I have multiple clients and the end point which is called from routing service is located at a third party, Now I need to Log every transaction passed through routing service into SQL Database...

    Any Idea?

    Monday, June 10, 2013 5:21 PM

Answers

  • On 6/10/2013 1:21 PM, Ekhnawy wrote:

    Hi,



    I'm trying to use Routing Service to route the data from clients to other end points, the thing is I have multiple clients and the end point which is called from routing service is located at a third party, Now I need to Log every transaction passed through routing service into SQL Database...



    Any Idea?

    You could use SQL Server Service Broker, it can use an async thread, the log record can be dumped into a message queue, the message in the queue is guaranteed to be delivered, SQL Server Broker will pull the record out of the message queue and insert the record into a log table. Service Broker works with the .NET CLR so you can Service Broker execute VB.NET or C#.NET to work with the queues with execuition of code hosted by SQL Server.
     SQL Server 2005 or better....

    http://msdn.microsoft.com/en-US/library/ms345108(v=SQL.90).aspx

    Monday, June 10, 2013 8:13 PM