2012-10-11 96 views
0

我有一个是通过webHttpRelayBinding和Azure的服务总线露出两个“本地”,并在云中的WCF REST服务。托管在IIS 6 WCF REST服务,也暴露了webHttpRelayBinding到服务总线

这对我的IIS 7.5 Express实例的伟大工程,但是当我把它部署到的Windows Server 2003/IIS 6的环境中,我开始收到以下错误:

The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.

我读过,我需要完全删除对ASP.NET的任何依赖关系来解决此问题(请参阅here)。我已经重构了我的代码,以便包含服务定义的程序集没有任何对System.Web的引用,但仍然出现错误。

所以我认为这是什么意思是,我不能在所有IIS托管服务。如果是这样的话,我唯一的选择是使用Windows服务来托管吗? WAS在Win2k3上不可用。

回答

0

你尝试在你的web.config移除从serviceHostingEnvironment元素aspNetCompatibilityEnabled属性?

本身就是它的可在WIN2K3(这是怎么webhosted WCF服务工作),但IIS的应用程序池和激活模型是在它的新版本略有不同。