locked
loal database will not deploy to Azure RRS feed

  • Question

  • User422192563 posted

    Howdy Ya'll

    I am new to Azure & have searched everywhere but cannot find an answer to this. I have a local MVC 5 app w/ simple database. I am using VS 2015 Community w/ all updates.

    Problem: Using visual studio, my web app works perfectly in Azure, BUT my local database will not deploy. The db works perfect locally, but when I deploy, only the web app shows up...the database is not there in Azure. I get a generic message saying "There was an error processing your request". I have tried creating the db in Azure and connecting w/ no luck. Everything but the database deploys. Any suggestions are appreciated. Thanks, everybody. Jeff

    Thursday, May 12, 2016 12:47 AM

Answers

  • User-491950272 posted

    Make sure that your web app in Azure is connected to Azure SQL. You can check it by going to Web App Settings => Application Settings => Connection Strings and make sure that is available there. If not then add it and make them available using Environment Variables in Production.

    Try to connect your Management Studio with your Azure SQL Db by providing the server name and password that you've configured while creating the database.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 12, 2016 7:31 AM

All replies

  • User-491950272 posted

    Make sure that your web app in Azure is connected to Azure SQL. You can check it by going to Web App Settings => Application Settings => Connection Strings and make sure that is available there. If not then add it and make them available using Environment Variables in Production.

    Try to connect your Management Studio with your Azure SQL Db by providing the server name and password that you've configured while creating the database.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 12, 2016 7:31 AM
  • User-646145796 posted

    Hi,

    jpres

    I have tried creating the db in Azure

    It seems you create Azure Sql database. If your application couldn't connect with Sql Databse, please double check "allow ip address" and "allow service" in Azure portal. Here is the steps:

    Open Azure portal -> click SQL DATABASE -> click "SERVER" -> click "CONFIG"

    Here are steps in Azure new portal:

    Click SQL Database ->click your database -> click “Server name” in DB Setting -> click "Show firewall settings" in Server name setting

    Best Regards,

    Jambor

    Friday, May 13, 2016 1:23 AM
  • User422192563 posted

    I have a database created in Azure. I can connect to my DB with SSMS and Object Explorer in Visual Studio. All the tables and data are there. I have the connection string in my web config file. In Azure under web app settings, I put my database name in "Name" text box and my connection string in the "Value" textbox. The website works perfectly on the internet until I hit a link (Comments) that requires database access. I just get a generic message that says "An Error occurred while processing your request". I have also verified my IP addressed in firewall settings.

    What am I doing wrong?      Thanks

    Jeff 

    Friday, May 13, 2016 2:33 AM
  • User422192563 posted

    I verified my web app settings. I put my database name in the "Name" textbox and my connection string in the "Value" textbox. Still no luck. Pulling my hair out!

    Jeff

    Friday, May 13, 2016 2:39 AM
  • User422192563 posted

    I finally got it! In my Azure web app settings (as you suggested), I had copied my connection string into the text box. I did not notice this:

    {ID} {Value}. I didn't realize that I had not entered my user id and my password into the connection string  Embarassed

    Thanks a million!      Jeff

    Friday, May 13, 2016 7:48 PM