net mvc 3应用程序的配置设置

时间:2022-07-18 04:13:40

i have an asp.net mvc 3 application that i want to deploy but i want to somehow automate the deployment process of the application. For example if i upload code to http://www.domain.com. when site is run for the first time it should check if database is setup if not it should run the sql server scripts from the scripts folder to user's specified server for his specified database. Then there are some settings that it should accept from the user and store in web.config like smtp, Official Email, phone etc. These are settings that are required only once in the lifetime of the application. Then there are settings that application should prompt at the end of the financial year.
what is best way (even a way would be highly appreciable) of doing this kind of stuff in asp.net mvc.

我有一个想要部署的asp.net mvc 3应用程序,但是我想以某种方式自动化应用程序的部署过程。例如,如果我上传代码到http://www.domain.com。当站点第一次运行时,它应该检查是否设置了数据库(如果不是的话),它应该从scripts文件夹中运行sql server脚本到用户指定的服务器,以获取用户指定的数据库。然后,它应该接受用户的一些设置并将其存储在web中。配置像smtp,正式的电子邮件,电话等等。这些是在应用程序的生命周期中只需要一次的设置。然后还有一些设置,应用程序应该在财政年度结束时提示。在asp.net mvc中做这种事情的最佳方式(即使是非常值得欣赏的方式)是什么?

1 个解决方案

#1


1  

Rather than outlining the whole process here, I will instruct you to check the Orchard setup, it does something similar, you might want to check out how they do it: http://orchardproject.net/

我不是在这里概述整个过程,而是指示您检查果园的设置,它做了类似的事情,您可能想看看它们是怎么做的:http://orchardproject.net/。

#1


1  

Rather than outlining the whole process here, I will instruct you to check the Orchard setup, it does something similar, you might want to check out how they do it: http://orchardproject.net/

我不是在这里概述整个过程,而是指示您检查果园的设置,它做了类似的事情,您可能想看看它们是怎么做的:http://orchardproject.net/。