Hosting the service in Internet Information

Conception Overview:

It is a better option to host a WCF service within Internet Information Services Server
(IIS) because IIS provides a robust, efficient, and secure host for the WCF services.
IIS also has better thread and process execution boundaries handling (in addition
to many other features) compared to a regular managed application.

 

The main drawback of hosting the service within IIS prior to version 7.0 is the tight
coupling between ASP.NET and web services, which limits the transport protocol
to HTTP/HTTPs. But with IIS 7.0, in addition to HTTP, you can now host a WCF
service with TCP, Named pipe, or MSMQ. You are no longer limited to HTTP.

 

Another thing you need to pay particular attention to when hosting WCF in IIS is
that the process and/or application domain may be recycled if certain conditions
are met. By default the WCF service session state is saved in memory so that
each recycle will lose all such information. This will be a big problem if you run a
website in a load-balanced or web-farm (web-garden) environment. In this case,
you might want to turn on the ASP.NET compatibility mode (add the attribute,
AspNetCompatibilityRequirements, to your WCF service) so that the session
state can be persisted in a SQL Server database or in the ASP.NET State Server.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值