WCF 下的windows服务的安装卸载
安装:启动vs2010(如果是win2008要以管理员来启动)命令:installutil demo.exe
卸载:先在服务里停止这个服务,然后启动vs2010(如果是win2008要以管理员来启动)命令:installutil /u demo.exe
创建WCF服务如下
第一步:建立Windows服务程序WindowsServiceHost


第二步:向ConsoleBookServiceHost程序中添加两个引用:一个是WCF服务库Services项目的引用,另一个是System.ServiceModel引用。
第三步:修改Service1的属性
在Service1的设计界面中右击,选择“属性”,把其中的(Name)和ServiceName都改为BookServiceHost

第四步:在Service1中编写代码如下

第五步:配置App.Config。
在这里我们不再详细说明如何配置了,我们直接把上一次SelfHostBookService项目中的App.Config复制过来却可

到这里我们已经作好一个可以发布BookService服务的Windows Service宿主程序了。
下面我们要看一看如何把这个Windows Service运行起来。
第六步:为服务添加安装程序。
在Service1设计界面中右击,选择“添加安装程序”

生成安装程序组件,出现界面如下

serviceProcessInstaller1:服务安装的信息

serviceInstaller1:服务本身的信息

第七步:安装上面编写完的服务
WCF 下的windows服务的安装卸载的更多相关文章
- Windows服务的安装卸载及错误查找
@echo off echo 清理原有服务项. . . %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil /U D:\abc\te ...
- C# Windows服务创建安装卸载
一.创建Windows服务 使用VS创建一个新的windows服务应用程序 创建完成之后 二.相关配置 修改Service1名称为StartService(可以不改,自行选择) 添加安装程序并修改配置 ...
- 通过批处理进行Windows服务的安装/卸载&启动/停止
安装服务 @echo off set checked=2 set PATHS=%~sdp0 echo 按任意键执行安装……? pause>nul if %checked% EQU 2 ( %PA ...
- Windows下当地RabbitMQ服务的安装
Windows下本地RabbitMQ服务的安装 本文参考:刘若泽相关技术文档 当然这些内容页可以通过RabbitMQ官方网站获得. RabbitMQ配置说明手册 一.RaibbitMQ服务器配置 1. ...
- 简单的Windows 服务的安装和卸载
步骤: 1.运行--〉cmd:打开cmd命令框 2.在命令行里定位到InstallUtil.exe所在的位置 InstallUtil.exe 默认的安装位置是在C:/Windows/Microsoft ...
- C#操作windows服务,安装、卸载、停止、启动
public class ServiceUtil { private string _ServiceName = string.Empty; private string _AppName = str ...
- 使用InstallUtil对Windows服务进行安装与卸载
关于Visual Studio 2012中使用InstallUtil对Windows服务进行安装与卸载的文章,在MSDN中的http://msdn.microsoft.com/en-us/librar ...
- Windows Service的安装卸载 和 Service控制(转)
Windows Service的安装卸载 和 Service控制 原文地址:http://www.cnblogs.com/Peter-Zhang/archive/2011/10/15/2212663. ...
- 为C# Windows服务添加安装程序
最近一直在搞Windows服务,也有了不少经验,感觉权限方面确定比一般程序要受限很多,但方便性也很多.像后台运行不阻塞系统,不用用户登录之类.哈哈,扯远了,今天讲一下那个怎么给Windows服务做个安 ...
随机推荐
- KMeans聚类算法Hadoop实现
Assistance.java 辅助类,功能详见注释 package KMeans; import org.apache.hadoop.conf.Configuration; import org. ...
- Google的小秘密
google有计算器的功能,例如在google中搜索25*25.lg(13)等,看会出现什么样的结果. http://www.google.com/microsoft 微软风格的入口 http: ...
- angular的ng-class
项目内想到要替换class时,第一反应是使用angular最为简单粗暴的class改变方式: 在angular中为我们提供了3种方案处理class: 1:scope变量绑定,如上例.(不 ...
- 编写高性能 Web 应用程序的 10 个技巧
使用 ASP.NET 编写 Web 应用程序的简单程度令人不敢相信.正因为如此简单,所以很多开发人员就不会花时间来设计其应用程序的结构,以获得更好的性能了.在本文中,我将讲述 10 个用于编写高性能 ...
- angularJs--$on、$emit和$broadcast的使用
$emit只能向parent controller传递event与data $broadcast只能向child controller传递event与data $on用于接收event与data 例子 ...
- laravel项目拉取下来安装,node.js库安装
1.拉取项目 2.切换分支 圈圈里面是版本 composer 安装laravel组件其他库 安装node.js安装包 npm set registry=https://registry.npm.ta ...
- PHP连接局域网MYSQL数据库的简单实例
PHP连接局域网MYSQL数据库的简单实例 [php] view plaincopy <?PHP /** * php连接mysql数据库 * by www.jbxue.com */ $conn= ...
- http://phantomjs.org/page-automation.html
http://phantomjs.org/page-automation.html install brew curl -LsSf http://github.com/mxcl/homebrew/ta ...
- Pop Sequence (栈)
Pop Sequence (栈) Given a stack which can keep M numbers at most. Push N numbers in the order of 1, ...
- nginx配置location [=|~|~*|^~] /uri/ { … }用法
版权声明:https://github.com/wusuopubupt ====== nginx location语法 基本语法:location [=|~|~*|^~] /uri/ { … } = ...