locked
Database connects from Localhost but not on Azure RRS feed

  • Question

  • User-2097295820 posted

    I recreated my database server and db. I inserted the new connection string in the local version of my app. I allowed ip in firewall settings. I allow Azure services to connect with my db.

    The local version of my application can connect very well with my db on azure. But When I upload my web.config file to azure I notice the online version does not connect. Could this be happening because of code update. I dont seem to understand why the online version is not connecting to db. Or is there someting I am forgetting to do. Kindly correct me.

    Friday, February 26, 2016 3:51 PM

Answers

  • User281315223 posted

    When you recreated / restored the database, are you sure that everything (database, tables, etc.) is properly named exactly as it was prior to the deletion? You may want to double-check the entire connection string to ensure that everything looks good.

    You may also want to look at any permissions-related information regarding the database and ensure that there are no differences within the permissions (or that the user specified within your connection string still has access to the same database).

    Have you tried placing a breakpoint within your code and trying to find an exception message or checking the Event Viewer to see if anything is present there? SQL-related errors can generally be pretty helpful and will usually state exactly what the problem is.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 26, 2016 4:56 PM
  • User-646145796 posted

    Hi,

    Which database do you use? SQL server or SQL database? Please double check the connection to make sure they are right. If use SQL database, please also check the "CONFIG" in Azure portal. Refer to https://azure.microsoft.com/en-us/documentation/articles/sql-database-configure-firewall-settings/ for more information. If use SQL server, please double check the firewall settings. It's a choice to use VS Server Explorer to connect to the database to see whether you can connect successfully. Any problem, welcome back to our forum.

    Best Regards,

    Jambor

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 29, 2016 1:51 AM

All replies

  • User281315223 posted

    When you recreated / restored the database, are you sure that everything (database, tables, etc.) is properly named exactly as it was prior to the deletion? You may want to double-check the entire connection string to ensure that everything looks good.

    You may also want to look at any permissions-related information regarding the database and ensure that there are no differences within the permissions (or that the user specified within your connection string still has access to the same database).

    Have you tried placing a breakpoint within your code and trying to find an exception message or checking the Event Viewer to see if anything is present there? SQL-related errors can generally be pretty helpful and will usually state exactly what the problem is.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 26, 2016 4:56 PM
  • User-646145796 posted

    Hi,

    Which database do you use? SQL server or SQL database? Please double check the connection to make sure they are right. If use SQL database, please also check the "CONFIG" in Azure portal. Refer to https://azure.microsoft.com/en-us/documentation/articles/sql-database-configure-firewall-settings/ for more information. If use SQL server, please double check the firewall settings. It's a choice to use VS Server Explorer to connect to the database to see whether you can connect successfully. Any problem, welcome back to our forum.

    Best Regards,

    Jambor

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 29, 2016 1:51 AM
  • User-2097295820 posted

    Thanks Rion,

    I would do as you have adviced and get back to you.

    Monday, February 29, 2016 2:32 PM