WCF服务部署 - 工具 [英] WCF service deployment - tools

查看:156
本文介绍了WCF服务部署 - 工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个在IIS下运行的WCF服务。该服务访问其文件夹中的文件,它访问SQL Server数据库,并将消息写入EventLog。

There is a WCF service which is running under IIS. This service accesses the files in its folder, it accesses a SQL Server database and it writes messages to the EventLog.

部署平台是某些数据中心中的Windows Server 2008。我开发的服务,但我真的还是一个初学者。

The deployment platform is Windows Server 2008 in some datacenter. I developed the service, but I'm really still a beginner.

部署将导致创建一个新的Windows用户帐户,并且可能会分配给该用户的角色。这需要从具有严格定义权限的单独帐户启动服务(据我所知,建议使用此方法,但不能从NT服务帐户启动服务)。

The deployment will causes the creation of a new Windows user account and, possibly, a role that is assigned to that user. This is needed to start the service from a separate account with strictly defined rights (as I understand, this approach is recommended, but not to start the service from NT Service account).

显然,部署需要运行脚本来创建数据库,表,任务的调度。

Obviously, the deployment needs to run scripts to create database, tables, scheduling of tasks.

您可以通过哪些工具来完成这种部署?也许我可以使用标准的安装项目?还是一些第三方工具,如WiX Toolset?是否应该使用PowerShell来创建Windows用户帐户和角色?

What tools could you advice to accomplish such a deployment? Maybe I can use the standard Setup Project? Or some third-party tools such as WiX Toolset? Should I use PowerShell to create windows user account and role?

还有一个问题:我应该提取先决条件,如.NET框架安装程序,SQL Server安装程序?

There is also a question: should I pull the prerequisites, such as .NET framework installer, SQL Server installer?

推荐答案

您可以依靠Windows安装程序使用WIX,InstallShield或高级安装程序。 WIX是唯一免费的,虽然它具有较高的学习者曲线。还有其他免费的Windows安装软件解决方案,例如 NSIS 。您还可以编写自己的脚本,如在Powershell中创建IIS虚拟目录,应用程序池并连接到RDBMS以创建模式。您可能还需要卸载部署解决方案,以便将来卸载它并对其进行升级。基于Windows安装程序的工具几乎可以免费卸载,因为它维护安装过程中完成的所有内容的数据库,而不是您编写的自定义操作(如数据库模式设置)。

You can rely on Windows installer using tools like WIX, InstallShield or Advanced Installer. WIX is the only free one albeit it has a higher learner curve. There are other free windows installation software solutions available as well such as NSIS. You can also write your own scripts such as in Powershell to create the IIS virtual directory, application pool and connect to the RDBMS to create the schema. You'll probably also would like to have an undeployment solution so you can uninstall it and upgrade it in the future. The Windows installer based tools almost gives you uninstall for free because it maintains a database of everything that was done during installation sans the custom actions you write such as the database schema setup.

对于用户配置部分,其中一些工具(如高级安装程序)可以创建新的用户帐户。但是要定义用户权限分配,您可能必须使用Windows资源工具包中的ntrights.exe依赖自定义脚本。

For the user configuration part, some of these tools such as Advanced Installer can create new user accounts. However to define user rights assignment you might have to rely on a custom script using ntrights.exe from the Windows resource kit.

这篇关于WCF服务部署 - 工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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