locked
Hosting ASP.net core app with azure sql database RRS feed

  • Question

  • User-20345506 posted

    I have created a blog using ASP.net core and connected it to the local data base.Now  I am trying to host it online.I have created SQL database in azure and able to Connect the SQL database to visual studio.But I am unable to connect it to my app.I have been trying to connect my app to the azure SQl Database by using the connection string.But I am not sure whether is it right to use the connection string under name of ADO.net.?

    and Is it enough to just replace the connection string in configuration settings or Do I also need to make any configuration during publish.kindly provide step by step process .

    Thanks in Advance :)

    Saturday, March 18, 2017 2:51 AM

All replies

  • User-1315512054 posted

    Hello,

    For connections strings examples you could check at https://www.connectionstrings.com/sql-azure/.

    Before deploying you should change your connection string.

    Regards

    Saturday, March 18, 2017 8:03 AM
  • User-20345506 posted

    I have used the following connection string

    Server=tcp:[serverName].database.windows.net;Database=myDataBase;User ID=[LoginForDb]@[serverName];Password=myPassword;Trusted_Connection=False;Encrypt=True;

    which is working fine for my local host ,but the thing is that if i am trying to publish it I can't find any  Databases in Settings of  publish and if I am trying to add database by selecting  

    Microsoft azure App service and I have to select new option to create new Resource Group since I can't find any database in already created resource group

    Saturday, March 18, 2017 11:51 AM