Web Service Configuration Problem

I host 2 WCF web services and 1 standard .NET web service from an application directory. The .NET service and 1 of the WCF services works perfectly; however, the other WCF service is returning the following error:

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'.

Both WCF web services have the line

<AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)> _

and the web.config file has

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

To add more confusion to the mix, when I change

AspNetCompatibilityRequirementsMode.Allowed

to

AspNetCompatibilityRequirementsMode.Required

the service works just fine.

Also, changing

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

to

<serviceHostingEnvironment aspNetCompatibilityEnabled="false" />

in the web.config also allows all web services to function.

This problem is presenting on both IIS7 and our staging enviorment hosted on SBS2003 running IIS6.

Thank you in advance for all of your help.
Джейк

ОБНОВЛЕНИЕ:
Мне удалось заставить его работать, удалив приложение из моей системы разработки; однако проблема все еще сохраняется на нашем промежуточном сервере, даже после удаления приложения и его воссоздания.

РАБОТА ПО ВСЕМУ:

  1. Удалить приложение из IIS
  2. Восстановить директорию
  3. Создать новый пул приложений
  4. В свойствах директории создайте приложение и свяжите его с новым пулом приложений.

Какая боль.

8
задан Jacob Hulse 21 June 2011 в 18:27
поделиться