带有本地db .mdf文件的Web应用程序如何发布到Azure [英] web app with local db .mdf file how to publish to Azure

查看:66
本文介绍了带有本地db .mdf文件的Web应用程序如何发布到Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Azure上发布的Web应用程序(通过Visual Studio在本地创建)我还迁移了我的主数据库(Azure Sql数据库)并与Web应用程序连接,并且已经创建了一个sql server实例.我的问题是我的App_Data文件夹中的本地db文件.mdf文件.当我发布我的应用程序时,返回以下错误:provider:SQL网络接口,错误:52-无法找到LocalDB安装.验证是否正确安装了SQL Server Express,并且已启用LocalDB功能.如何附加.mdf文件?并将其与我的SQL Server实例相关联?谢谢

I have a web app published on Azure.(created locally via visual studio) I ve also migrated my main Database(Azure Sql database) and connected with the web app and of cource already created an sql server instance. My problem is with my local db file .mdf file in my App_Data folder. When i published my app returned error below: provider: SQL Network Interfaces, error: 52 - Unable to locate a LocalDB installation. Verify that SQL Server Express is properly installed and that the LocalDB feature is enabled. How to attach .mdf file ? and associated it with my sql server instance? Thanks

推荐答案

我认为您不能使用SQL Server Express(肯定没有安装Express).为什么要使用SQL Server Express?

I think you can't use SQL Server Express (pretty sure there is no Express installed). Why do you want to use SQL Server Express?

无论如何,您可以将其迁移到Azure到SQL Server Compact中-

Anyway, you can migrate it to Azure into SQL Server Compact - http://www.asp.net/mvc/overview/older-versions/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-deploying-sql-server-compact-databases-2-of-12

但是,如果您打算实现任何类型的复制-任何实例都将拥有自己的数据库-以及其他一些缺点,则这种方式并不是很有效.

But that way is not very efficient if you plan to implement any type of replication - any instance will have own db - and some other drawbacks.

我认为,最好的方法是使用SQL Azure,如果不需要SQL Server Compact/Express之类的数据,则可以将数据迁移到其中.

I believe that the best way here is to use SQL Azure and migrate your data into it if there is no need in something like SQL Server Compact/Express.

这篇关于带有本地db .mdf文件的Web应用程序如何发布到Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆