I'm trying to test my REST service with WebCache attribute
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public partial class MyContract : IMyContract
{
[OperationContract()]
[WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate = "items/{code}"
[WebCache(CacheProfileName = "NoCacheProfile")]
public ItemDTO GetItem(string code)
when i try to open the host
WebServiceHost host = new WebServiceHost2(typeof(MyContract), true, new Uri("http://localhost:7777/MySvc"));
host.Open();
i get the following exception
[System.NotSupportedException] = {"WebCacheAttribute is supported only in AspNetCompatibility mode."}