i have the following service contract:
[ServiceContract]
public interface IMusicService
{
[OperationContract]
[WebGet(
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest
)]
List<Artist> GetArtists();
[OperationContract]
[WebGet(
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest,
UriTemplate = "GetTracks?artistID={artistID}"
)]
List<Track> GetTracks(int artistID);
}
but when i try to access it, i get the following error:
Endpoints using 'UriTemplate' cannot be used with 'System.ServiceModel.Description.WebScriptEnablingBehavior'.i'm using the WebScriptServiceHostFactory so i can do JSONP callbacks. why can't i use the UriTemplate? if i cannot, how am i supposed to do REST in WCF if i want to use JSONP????
...
Go to the complete details ...