如何使用ASP.NET MVC 2网站打包/发布SQL数据库? [英] How to Package/Publish SQL databases with ASP.NET MVC 2 Website?

查看:207
本文介绍了如何使用ASP.NET MVC 2网站打包/发布SQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在已配置并正在运行的本地IIS 7服务器上首次部署ASP.NET MVC 2网站.我已经使用不带数据库的Web Deploy选项成功进行了部署(因此该站点尚未完全正常工作).大多数部署设置都非常直观,但是,项目设置中的Package/Publish SQL选项卡存在问题.这是我收到的错误的外观(单击以查看大图).

I'm trying to deploy my ASP.NET MVC 2 Website for the first time on a local IIS 7 server, which is configured and running. I've made successful deployments using the Web Deploy option without the databases (so the site isn't fully working yet). Most of the deployment settings are pretty intuitive, however, I have problems with the Package/Publish SQL -tab in the project settings. Here's how it looks like with the errors I'm getting (click for bigger view).

它要求连接字符串,但我不知道该放在哪里.对于使用架构文件的另一个进程,它也给出了一个奇怪的错误.

It asks for Connection String, but I have no idea what to put there. It also gives a weird error about another process using a schema file.

欢迎使用任何指针.我正在寻找最简单的方法来使其运行.

Any pointers are welcome. I'm looking for the easiest way to just get it running.

推荐答案

我能够通过取消选中打包/发布Web"选项卡中的从App Data文件夹中排除文件"来使数据库运行.然后,它仅复制数据库文件.

I was able to get the databases running by unchecking the "Exclude files from the App Data folder" in Package/Publish Web tab. It then simply copies the database files.

这篇关于如何使用ASP.NET MVC 2网站打包/发布SQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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