0

New to Azure and have difficulty to connect DB with webapp. I am playing with a demo project using entityframework and code first mitigation. It works as expected in my local computer and localdb. But it does not work when I try to deploy it to Azure. I use the Webapp and a SQLDatabase in Azure. Then, I try to connect them using connection string in Webconfig.

  <add name="DefaultConnection" connectionString="Server=tcp:dritor.database.windows.net,1433;Database=dritorDB;User ID=****@dritor;Password={****};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30" providerName="System.Data.SqlClient" /> 

The homepage shows up as expected. But when I try to fetch data from DB (I put some data with seed), it returns something as follows:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

 <Error>
  <Message>An error has occurred.</Message>
  </Error>

I suspect that I made the connectionstring wrong but I am not sure. Any suggestions on how to debug in this situation would be appreciated.

2
  • 2
    The string looks correct except for the curly braces around the password. It should just be Password=**** Commented Mar 27, 2016 at 0:28
  • Haha, works like a charm. You saved my day! Commented Mar 27, 2016 at 0:31

1 Answer 1

2

The string looks correct except for the curly braces around the password. It should just be Password=****

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

Comments

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.