Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF json REST service one of the methods returns 404, the rest of the methods works fine
    text
    copied!<p>I have created a WCF rest service with 3 methods, the problem is that two of the methods works fine on the visual studio development server, but the last one returns 404 (both when I try to consume the service with jquery, according to fiddler2, and when trying to access the method with a browser.</p> <p>the service contract for the method that dosen't work looks like this:</p> <pre><code> [OperationContract] [FaultContract(typeof(GeneralCalendarFault))] [FaultContract(typeof(ConfigurationFault))] [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GeoLocationSearch/{controlIdentification}/{positionX}/{positionY}/{positionZ}/{radiusInMeters}/{maxNumberOfEventsToBeReturned}/{startFetchingFromIndex}")] GeoLocationSearch_Response GeoLocationSearch(string controlIdentification, string positionX, string positionY, string positionZ, string radiusInMeters, string maxNumberOfEventsToBeReturned, string startFetchingFromIndex); </code></pre> <p>the service contract for the two method that works looks like this:</p> <pre><code>[OperationContract] [FaultContract(typeof(GeneralCalendarFault))] [FaultContract(typeof(ConfigurationFault))] [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/AdressSearch/{controlIdentification}/{addressSearchString}/{maxNumberOfEventsToBeReturned}/{startFetchingFromIndex}")] AddressSearch_Response AdressSearch(string controlIdentification, string addressSearchString, string maxNumberOfEventsToBeReturned, string startFetchingFromIndex); </code></pre> <p>and</p> <pre><code>[OperationContract] [FaultContract(typeof(GeneralCalendarFault))] [FaultContract(typeof(ConfigurationFault))] [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetAddressSuggest/{controlIdentification}/{search}/{maxNumberOfSuggestsToBeReturned}")] GetAddressSuggest_Response GetAddressSuggest(string controlIdentification, string search, string maxNumberOfSuggestsToBeReturned); </code></pre> <p>the endpoint configuration looks like this:</p> <pre><code>&lt;service name="Somenamespace.ServiceRest" behaviorConfiguration="Somenamespace.DevelopmentBehavior"&gt; &lt;endpoint binding="webHttpBinding" address="json" contract="Somenamespace.IServiceRest" /&gt; &lt;endpoint binding="mexHttpBinding" address="mex" contract="IMetadataExchange" /&gt; &lt;/service&gt; .... &lt;webHttpBinding&gt; &lt;binding name="webHttpBinding" allowCookies="false" bypassProxyOnLocal="false" closeTimeout="00:10:00" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transferMode="Buffered" useDefaultWebProxy="true" &gt; &lt;security mode="None"&gt; &lt;!--&lt;transport clientCredentialType = "Windows" proxyCredentialType="None" realm="hei" /&gt;--&gt; &lt;/security&gt; &lt;readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" /&gt; &lt;/binding&gt; &lt;!--proxyAddress="URI" writeEncoding="UTF8Encoding" --&gt; &lt;/webHttpBinding&gt; </code></pre> <p>I can't se anything that I do different with the GeoLocationSearch method that would make that method fail with a 404 not found, and the rest work perfectly.</p> <p>anyhelp would be would be highly appreciated.</p> <p><strong>Edit:</strong> here is the http header for a request to a method that works:</p> <pre><code>GET http://localhost:52896/ServiceRest.svc/AdressSearch/11111111-1111-1111-1111-111111111111/Mikke%20Mus/10/0?_=1384292586745 HTTP/1.1 Host: localhost:52896 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://localhost:59026/Front.aspx Origin: http://localhost:59026 Connection: keep-alive </code></pre> <p>and here is the http header for a request to the GeoLocationSearch method that results in 404:</p> <pre><code>GET http://localhost:52896/ServiceRest.svc/GeoLocationSearch/11111111-1111-1111-1111-111111111111/11.495263000000001/64.015019/0/200/10/0?_=1384292586747 HTTP/1.1 Host: localhost:52896 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://localhost:59026/Front.aspx Origin: http://localhost:59026 Connection: keep-alive </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload