1

How I can move my local database in project in order that I can deploy this database to Azure? Know on Azure when I login I get an error:

Error: an error occurred while processing your request

It is because I have no connection to my database. I have created the database on Azure portal but it's empty. How can I connect to my database from my app so that it works?

enter image description here

This is the complete error:

[Win32Exception (0x80004005): The system cannot find the file specified]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
....
[EntityException: The underlying provider failed on Open.]

The solution: When you deploy app click 'Publish' - > 'Create new Profile' -> In field 'Explore additional Azure Services' click - > 'Create a SQL Database'

3
  • 1
    you already have a database created on azure? Commented May 1, 2020 at 13:07
  • The error is local: "Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled." The mdf file you have locally is your database, you need to deploy that to the Azure database. Commented May 1, 2020 at 13:22
  • Ok, so I need deploy database on Azure but how to do it? Commented May 1, 2020 at 15:58

1 Answer 1

1

According your comment, you problem turned to be deploy database to Azure.

There are many ways you can to that.

Since you have created the database on Azure portal, the easiest way is that you can using SSMS Deploy Database wizard:

enter image description here

For more details, you could reference this tutorial: Learn how to Migrate a SQL Server database to SQL Azure server.

Once the database is deployment to Azure SQL database successfully, you could get the connection string on Azure SQL database page on Portal:

enter image description here

Ref:Get ADO.NET connection information (optional)

hope this helps.

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.