[英]How to deploy an asp.net mvc 4 application with database?
I'm new to asp.net
and want to do the following: 我是asp.net
新手,并希望执行以下操作:
I have an asp.net mvc 4
website that uses a local database (mdf). 我有一个使用本地数据库(mdf)的asp.net mvc 4
网站。 I want to install that website on a windows 2012 server (amazon ec2). 我想在Windows 2012服务器(amazon ec2)上安装该网站。
My Questions: 我的问题:
There are several steps: 分几个步骤:
Include files from the App_Data folder
. 您可以通过单击Include files from the App_Data folder
数据库。 c:\\inetpub\\wwwroot
. 您将发布的文件夹转移到Windows 2012中,例如,在c:\\inetpub\\wwwroot
的子文件夹中。 Note: I am not that familiar with mdf
files, but you will certainly have to modify your web.config
, to point to the actuel path of the mdf
file ( c:\\inetpub\\wwwroot\\MY_SITE\\AppData\\MYDATABASE.mdf
). 注意:我对mdf
文件不是很熟悉,但是您肯定需要修改web.config
,以指向mdf
文件的actuel路径( c:\\inetpub\\wwwroot\\MY_SITE\\AppData\\MYDATABASE.mdf
)。
Note: Also, the IIS User account should have the right to write the database; 注意:此外,IIS用户帐户应有权写入数据库; so the folder c:\\inetpub\\wwwroot\\MY_SITE\\AppData\\
should have its security modified accordingly (right click, Properties / Security
) to add the IIS User (as this is the account that should run the Web Site). 因此,应该相应地修改文件夹c:\\inetpub\\wwwroot\\MY_SITE\\AppData\\
的安全性(右键单击Properties / Security
)以添加IIS用户(因为这是应该运行网站的帐户)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.