WCF - WAS Hosting

To understand the concept of WAS hosting, we need to comprehend how a system is configured and how a service contract is created, enabling different binding to the hosted service.

为了明白WAS托管的概念,我们需要理解一个系统是如何配置的,以及一个服务契约如何被创建的。确保托管服务可以接受不同的绑定

First of all, enable WCF for non-protocols. Before we start creating the service, we need to configure the system to support WAS. Following are the steps to configure WAS:

首先,确保wcf是无协议的。在我们开始创建服务之前,我们需要配置系统来支持WAS。配置WAS的步骤如下

  • Click Start Menu ≫ Control Panel ≫ Programs and Features, and click "Turn Windows Components On or Off" in the left pane.

  • Expand "Microsoft .Net Framework 3.0" and enable "Windows Communication Foundation HTTP Activation" and "Windows Communication Foundation Non- HTTP Activation".

  • Next, we need to add Binding to the default website. As an example, we will bind the default website to the TCP protocol. Go to Start Menu ≫ Programs ≫ Accessories. Right click on the "Command Prompt", and select "Run as administrator" from the context menu.

  • Execute the following command:

1.开始菜单-->控制面板-->程序和功能,打开或关闭windows功能。

2.展开.net3.0,启用WCF HTTP Activation和WCF Non- HTTP Activation

3.需要给默认的网站添加绑定,例如,我们可以给默认的网站绑定TCP协议。以管理员权限启动命令提示符

4.执行以下命令

appcmd.exe set site "Default Web Site" -+bindings.[protocol='net.tcp',bindingInformation='808:*']     //吐槽下,这个命令执行出错了,我都不知道该怎么解决

This command adds the net.tcp site binding to the default website by modifying the applicationHost.config file located in the "C:\Windows\system32\inetsrv\config" directory. Similarly, we can add different protocols to the default website.

Create WAS Hosted Service

Step-1: Open Visual Studio 2008 and click New → WebSite and select WCF Service from the template and Location as HTTP, as shown below:

无力吐槽,后面的是IIS的差不多,关键是配置文件看不懂

WCF - WAS Hosting的更多相关文章

  1. WCF - Self Hosting

    WCF - Self Hosting Here, the WCF service is hosted in a console application. Given below is the proc ...

  2. WCF - IIS Hosting

    WCF - IIS Hosting Hosting a WCF service in IIS (Internet Information Services) is a step-by-step pro ...

  3. Learning WCF Chapter1 Hosting a Service in IIS

    How messages reach a service endpoint is a matter of protocols and hosting. IIS can host services ov ...

  4. (WCF) WCF Service Hosting.

    3 Options. 1. Host inside of an application. 2. Host into Windows service. 3. Host into IIS 参考: http ...

  5. WCF - Hosting WCF Service

    After creating a WCF service, the next step is to host it so that the client applications can consum ...

  6. WCF - Hosting WCF Service 四种托管方式

    https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm After creating a WCF service, the next st ...

  7. WCF学习系列汇总

    最近在学习WCF,打算把一整个系列的文章都”写“出来,包括理论和实践,这里的“写”是翻译,是国外的大牛写好的,我只是搬运工外加翻译.翻译的不好,大家请指正,谢谢了.如果觉得不错的话,也可以给我点赞,这 ...

  8. WCF学习系列二---【WCF Interview Questions – Part 2 翻译系列】

    http://www.topwcftutorials.net/2012/09/wcf-faqs-part2.html WCF Interview Questions – Part 2 This WCF ...

  9. WCF 入门(29)

    前言 最近工作比较忙,加了会班就不想再写东西了,就想洗洗睡. 但是这个视频真的不能断,不能像过去一样写了几集就停了. 现在公司在做一个MVC框架的项目,话说已经一年没有写MVC了,重新上手的感觉还可以 ...

随机推荐

  1. MFC: Create Directory

    Original link: How to check if Directory already Exists in MFC(VC++)? MSDN Links: CreateDirectory fu ...

  2. 程序员面试题精选100题(16)-O(logn)求Fibonacci数列[算法]

    作者:何海涛 出处:http://zhedahht.blog.163.com/ 题目:定义Fibonacci数列如下: /  0                      n=0 f(n)=      ...

  3. nodejs的调试

    js的调试始终是一个比较麻烦也是比较困难的事情,从最原始的alert调试,到火狐的firebug工具,在到后来各个浏览器厂商的调试工具.调试工具的发展历程,也可以看出由JS构建的业务和技术逻辑越来越复 ...

  4. Mac OS X平台上Java环境的配置

    最近换了工作,以前是做c/c++的,但是现在公司的主打产品是使用Java开发,为了以后维护代码,现在开始抽空学习一下Java相关的内容. 在学习之前,首先需要搭建各种平台的开发环境,而我选用的操作系统 ...

  5. Qt多文档界面应用设计

    使用Qt编写多文档界面(MDI)应用相当方便,主要会使用到QMdiArea和QMdiSubWindow两个类.可以查看Qt Asistant中这两个类的说明文档,里面介绍的相当详细.另外,可以搜索例程 ...

  6. this在JavaScript中的工作范围

    this在JavaScript中的工作范围 在一个函数中,this的行为,取决于JavaScript函数的调用方式和定义方式,而不仅仅是看它如何被定义的. var fullname = 'Fu';va ...

  7. object-fit: 炒鸡方便的图片居中方法

    今天在项目中遇到图片居中的问题,嗯,之前也有写过解决这个问题的文章,有n种方法.不过今天要说一个新的方案:object-fit ,嗯,这个才是真的方便的方案啊. 先看预览: object-fit 只能 ...

  8. 详解MySQL中EXPLAIN解释命令(转)

    explain显示了mysql如何使用索引来处理select语句以及连接表.可以帮助选择更好的索引和写出更优化的查询语句. 使用方法,在select语句前加上explain就可以了: 如: expla ...

  9. PhpStorm一次性折叠所有函数或者方法

    有时候一个类实里面的方法实在太多了,要找到指定的方法很慢,我一般都是通过ctrl+F12直接显示一个弹出层,里面只有这个类的属性和方法,点击就能快速定位了.但是有时候是一个类里面找来找去,这个访问就不 ...

  10. Google考虑抛弃Cookies机制

    根据华尔街日报的报道,Google 正在考虑抛弃古老的浏览器 cookies 来追踪用户信息的机制.作为替代,Google 将开发一种「个人匿名标识机制」.Google 早前已经计划在 IE 和 iP ...