简体   繁体   English

将ASP.NET Web项目上的现有数据从Visual Studio中的本地数据库部署到Azure数据库

[英]Deploy existing data on ASP.NET web project from local database in Visual Studio to Azure database

I've successfully deployed my ASP.NET project to Azure but the database has been deployed with no data, consequently throwing internal server errors due to functionality requiring that data. 我已成功将ASP.NET项目部署到Azure,但是该数据库没有数据部署,因此由于需要该数据的功能而导致内部服务器错误。 I can't see the exact error message as I'm unable to disable customErrors on my project (there's no webconfig file on Razor Pages) 我无法看到确切的错误消息,因为我无法在项目上禁用customErrors(Razor Pages上没有webconfig文件)

I need to update my database on Azure with the data currently stored locally. 我需要使用当前本地存储的数据更新Azure上的数据库。 How do you do this and is this possible? 您如何做,这可能吗?

NB - I am using EF core with code-first migrations for data access NB-我将EF核心与代码优先迁移一起用于数据访问

On the local machine open the "Microsoft server SQL management studio", connect to the local database server and navigate to the appropriate database. 在本地计算机上,打开“ Microsoft服务器SQL管理工作室”,连接到本地数据库服务器并导航到适当的数据库。 Rightclick on the database name and select "Generate scripts...". 右键单击数据库名称,然后选择“生成脚本...”。 Select the tables you want to export, then click "next>". 选择要导出的表,然后单击“下一步>”。 On this screen click the "Advanced" button, scroll down to "Types of data to script" and select "Data only". 在此屏幕上,单击“高级”按钮,向下滚动到“脚本的数据类型”,然后选择“仅数据”。 Now you can generate the script and copy that to a connection to the Azure DB, that can be an other query in de Management Studio or in the Azure portal. 现在,您可以生成脚本并将其复制到与Azure DB的连接,该连接可以是de Management Studio或Azure门户中的另一个查询。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 ASP.NET Web 应用程序部署到 Azure 与现有的 Z9778840A0104CB30C52ZB7 服务器数据库 (76410CB30C52ZB7) 服务器数据库 - How to deploy an ASP.NET Web App to Azure with an existing SQL Server database (Azure Data Studio) 是否可以在 Visual Studio 中连接现有的本地数据库并使用 ASP.NET mvc Core 在 Web 上生成数据? - Is it possible to connect an existing local Database in Visual studio and generate the Data on Web with ASP.NET mvc Core? 如何在 Visual Studio asp.net 项目中从远程数据库设置本地数据库? - How to setup local database from remote database in visual studio asp.net project? Visual Studio 2015 ASP.NET Web应用程序中的本地数据库 - Local database in visual studio 2015 ASP.NET web application 使用现有SQL数据库的ASP.NET Visual Studio 2012 - ASP.NET Visual Studio 2012 using existing SQL Database 将Azure数据库连接到现有的Asp.Net Web应用程序 - Connect Azure database to existing Asp.Net web application 使用Visual Studio 2012将具有数据库的ASP.net Web应用程序发布到Azure - Publishing ASP.net web application with database to Azure using Visual Studio 2012 在Visual Studio中运行Asp.NET项目时出现数据库错误 - DataBase Error while running Asp.NET project in Visual Studio 在没有.NET Core和Visual Studio的情况下将ASP.NET App部署到Azure Web App - Deploy ASP.NET App to Azure Web App without .NET Core and Visual Studio Visual Studio Online无需构建即可将ASP.NET网页连续部署到Azure网站 - Visual Studio Online continuous deploy ASP.NET web pages to Azure Websites without build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM