Custom Hybrid Connection Manager

Santhi Dhanuskodi 145 Reputation points
2024-05-08T15:25:31.47+00:00

Hi,

I would like to know if we can have a custom hybrid connection manager in .net core code. I would like to connect to on-prem sql server from a cloud deployed .net solution. I am using Azure app service /Relay/Hybrid Connection for the same. I would like to know if we can write a custom hybrid connection code in the .net solution itself.

If yes, please share links and documentation.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,226 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,851 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,988 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 57,646 Reputation points
    2024-05-08T15:49:56.0533333+00:00

    your goal is not clear.

    the relay/hybrid is typical proxy application with two components. the azure server proxy, and the on-premise proxy client. the proxy client connects to the azure server so, that no inbound connection is required. the sql client code, just connects to the proxy, which behaves just like a direct connection to the sql sever

    if you reversed engineered the proxy protocol the you could implement the server code in your application. this would require your site have an additional ipaddress for the proxy connection to on-prem, so you'd have to use a VM to host your site. this additional ipaddress is what sql client code would connect to.

    instead of reverse engineer, it would probably be easier to just write you own proxy server and client. As sql client does not support http, the proxy code would need to be hosted by a VM to support raw tcp traffic.

    1 person found this answer helpful.