[Mono-list] UriTemplate with Mono WCF service
Jeff Bonhag
jbonhag at SCA-CORP.COM
Sat Dec 13 16:01:35 UTC 2014
Hi,
Does anyone have an example of a WCF service method using a UriTemplate attribute that runs on Mono?
I have a service method like:
[OperationContract]
[WebGet(UriTemplate = "/12/13/14",
ResponseFormat = WebMessageFormat.Json)]
string Something ();
and my service model defined as follows:
<system.serviceModel>
<services>
<service behaviorConfiguration="Service1Behavior" name="WcfService1.Service1">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="Service1EndpointBehavior" contract="WcfService1.IService1" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Service1Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="Service1EndpointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
But when I visit http://localhost:8080/Service1.svc/12/13/14, I get a 500 (System.ServiceModel) error.
All the other endpoints in my WCF service class work fine; should I maybe set my endpoint address differently?
Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20141213/99ff3261/attachment.html>
More information about the Mono-list
mailing list