应用程序部署-asp.net mvc、windows服务
组成的应用程序
- 我创建了一个由asp.net mvc 3 控制面板
- windows 服务
- ms sql 数据库
我想创建一个能够处理该应用程序的部署和自动更新的安装程序。
该应用程序在安装过程中至少需要完成这些事情:
- 确保安装了 MsSQL 2008(如果没有提示用户或安装快速版本)
- 确保用户安装了 Net Framework 4.0、ASP.NET MVC 3.0(可能还安装了一些其他 Ms 产品)忘记了)
- 在 xml 配置文件中设置适当的连接字符串
- 添加 SQL Server 用户(用于运行实例的用户)读取/写入文件夹的权限
- 创建 IIS 站点和应用程序池(并部署应用程序)
- 设置应用程序水池模式为 4.0 集成
- 创建 Windows 服务
- 授予 ASP.NET 应用程序控制上述 Windows 服务的权限 (subinacl /service service_name /grant="IIS APPPOOL\DeployTest"=F)
- 创建数据库,运行创建脚本
- 创建数据库用户并授予他们适当的权限
- 编辑Web配置文件以设置一些自定义设置
这可能吗?或者我被迫手动执行此操作?
I've created an application that consists of a
- asp.net mvc 3 control panel
- windows service
- ms sql database
I would like to create an installer that is able to handle the deployment and auto updates of this application.
The application requires at least those things to be done during install:
- ensure MsSQL 2008 is installed (if not prompt the user or install express version)
- ensure user has Net Framework 4.0, ASP.NET MVC 3.0 installed (and probably some other Ms products I forgot)
- set appropriate connection strings in an xml configuration file
- add SQL Server user (the one that is used to run the instance) privileges to read/write to a folder
- create an IIS Site and application pool (and deploy the app)
- set the application pool mode to 4.0 Integrated
- create a windows service
- grant the asp.net application a privilege to control the mentioned windows service (subinacl /service service_name /grant="IIS APPPOOL\DeployTest"=F)
- create the database, run create scripts
- create database users and grant them appropriate privileges
- edit web config file to set some custom settings
Is it at all possible? Or am I forced to do that manually?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是可能的,并且有很多方法和工具可以实现这一目标。
最终,您可以创建一个 Windows 安装程序 (msi) 包,WIX 可以提供帮助。
It is possible and there're many ways and tools to achieve that.
Ultimately you can create a windows installer (msi) package which WIX can help.