No events raised when DB is on different physical / logical server
SQLDependency and Service broker works perfect in an architecture that has all the application tiers hosted on the same server, but presents a problem once the architecture is spread across multiple servers.
I have implemented both the standard .NET SqlDependency and the service broker listener (I prefer the later) and they both work perfectly when the connection string is pointing to the same server that the client (subscriber/consumer) is running on, but as soon as the connection string points to a different server no notification callbacks gets raised.
This may not be a very common problem but affects applications that have to be scaled out or that need the different tiers to be logically segregated due to standards or policies .i.e. PCI.
My last resort would be to help the service broker cross tiers by having the subscriber sitting in the same server as the DB then connecting to the intended subscriber through a keep alive connection of some sort .i.e a socket connection. But before going through this direction, I need to know if anyone has been successful at having the database running at server @server1 and the service broker running @server2 and events still being able to be received?
Did you fix this?
No, I worked around it by writing a service that would act as a proxy between the RDMS server and my application tier.
I did the same thing.
IIS (asp.net project) and SQL server are separate physical machines and i am not experiencing this issue. How can i duplicate your issue?
I'm also running this on separate machines and works as expected.