1. AspNetCompatibilityRequirements 设置这个是为了WCF走ASP.NET管线,能够获取到asp.net上下文信息。
如: HttpContext.Current
对应于这个设置,在web.config的<system.serviceModel>
中需要加上<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
转载于:https://www.cnblogs.com/lfzwenzhu/archive/2011/02/28/1966694.html