Creating Azure Hybrid Connection with Hybrid Connection Managaer

Creating Azure Hybrid Connection with Hybrid Connection Managaer



I have some REST APIs deployed to an app service an Azure.



I have added a hybrid connection to the app service, and deployed the hybrid connection manager to the relay server which I verified can connect to the DB. Both show as "connected".



I am having trouble configuring it, as it is my first attempt at this. I have 2 questions that if someone could I would be very grateful.



The DB I want to connect to is on ServerInstance, but it will not allow the "" at all in the name. I've tried just server, just instance, and IP, they all still gave the error "The server was not found or was not accessible".



Is the problem with the REST services config? They are using the Entity Framework, and have the connection string:



add name="WEBEntities" connectionString="metadata=res:///Models.WEB.csdl|res:///Models.WEB.ssdl|res://*/Models.WEB.msl;provider=System.Data.SqlClient;provider connection string="data source=serverinstance;initial catalog=WEB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"



Do I need to change this to point the Hybrid Connection instead? If so, how?



Thanks for any help, it's very appreciated.





It should be the dbserver name and port, without the instance name.
– Sage
Aug 24 at 18:43





Thanks. I got it to connect and now I'm getting the error: "System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.) ---> System.ComponentModel.Win32Exception: An established connection was aborted by the software in your host machine"
– J.Cart
Aug 24 at 19:14




1 Answer
1



The host should be the FQDN of the server - e.g. server1.xyz.com. You can use a named instance but you must use a static port. Please review: https://docs.microsoft.com/en-us/azure/biztalk-services/integration-hybrid-connection-overview . You won't need to change your EF connection string if the hybrid connection is configured correctly.





Also, I noticed your using Integrated Security=true in your connection string. This will obviously not work for the Hybrid Connection. You should use a SQL username/password. That or a firewall issue may be causing the Win32 exception you're getting.
– Mehdi Ibrahim
Aug 24 at 19:39





Ya I've changed it to a username/password. Now the error is: "System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.) ---> System.ComponentModel.Win32Exception: An established connection was aborted by the software in your host machine"
– J.Cart
Aug 24 at 20:43





Ok good, at least the error is different so you're making progress. The new error appears to be firewall related. Did you open up the ports mentioned in the link posted above and follow all other configuration? What are you seeing in the event logs of your SQL Server host?
– Mehdi Ibrahim
Aug 24 at 21:16





I'll have to check that on Monday as I'm not able to access the firewall unfortunately
– J.Cart
Aug 24 at 21:26






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)