CSLA.Net – WCF 服务的Server 端配置

CSLA.Net – WCF 服务的Server端配置
WCF Service 服务端的配置和普通的WCF Sevice 服务端的配置完全一样,没有特殊的地方。

如下是ProjectTracker 项目 – WCF服务端的配置。其中service name 为 Csla.Server.Hosts.WcfPortal,对应Csla.Server.Hosts.WcfPortal.cs 文件,实现了public class WcfPortal : IWcfPortal 接口。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
< system.serviceModel >
< services >
< service name = "Csla.Server.Hosts.WcfPortal"
behaviorConfiguration = "returnFaults" >
< endpoint contract = "Csla.Server.Hosts.IWcfPortal"
binding = "wsHttpBinding" />
</ service >
</ services >
< behaviors >
< serviceBehaviors >
< behavior name = "returnFaults" >
< serviceDebug includeExceptionDetailInFaults = "true" />
</ behavior >
</ serviceBehaviors >
</ behaviors >
</ system.serviceModel >

因为部署在IIS 中,还有一个对应的.svc — WcfPortal.svc文件,如下所示。
<% @ServiceHost Service=”Csla.Server.Hosts.WcfPortal” %>

转自 http://www.entlib.net/?p=749

 

 

你可能感兴趣的:(server)