1

I cannot set up a hybrid connection via Azure portal, always comes up not connected. I am trying to connect to a SQL Database but "through" another computer. Like so, "Website" <-> "Hybrid connection" <-> "Computer1[Hybrid connection manager] <- Computer2[sql server]"

Because I don't have access to computer2, but I can access Sql Server via computer1 and I have access to that computer. What I am trying to do is set up a hybrid connection to computer1 that connects to computer2[sql server]. All attempts have been unsuccessful. Can anyone help with this problem?

Hybrid connection setup:

  • name: clmconnection
  • status: Not connected
  • hostname computer1[name of cpu]
  • port: 1433

ConnectionString:

add name="HybridConnection" provider=System.Data.SqlClient;provider  
connection string=&quot;Server=computer1,1433;DataBase=databasename;  
user id=sa;password=sapassword;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /

Overview image

1 Answer 1

1

We followed the following guide and got it up and running:

https://azure.microsoft.com/en-us/documentation/articles/web-sites-hybrid-connection-connect-on-premises-sql-server/

The name of the computer you provide to the hybrid connection should be the name of the SQL Server you want to connect to. In your example, the hostname in the hybrid connection and server in the connection string should be "Computer2"

Sign up to request clarification or add additional context in comments.

4 Comments

Seems to be working now, I had to re-install the HybridConnectionManager on computer1. Used computer2 as hostname. Next step is to find out if I can access the database on the website. Thx for the help.
@elgurinn, I am also trying to setup the same scenario, hybrid connection showing connected but my webapp not able to access the SQL server which is resides on different SQL server. I have used SQL server hostname in hybrid connection. Can you share some insights how you have solved the problem.
@RahulKhengare, my understanding is that the hybrid connection was successful, therefore I think it may be a problem with the 'user name' and 'password' string you define in the config file. Have you successfully connected to the sql database e.g. via 'SQL management studio'?
@elgurin Thanks for reply. I have resolved the issue. Somehow, Azure website taking the old connection string which was deployed at the first time. Deploying website again doesn't changed the configuration file in website. I've removed the old connection string from portal and everything worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.