when test wcfservice's method putting query string in address bar shows "endpoint not found.".please me wrong? simple test method add 2 numbers running properly.i running on localhost.below web.config
<connectionstrings> <add name="es_securitycontext" connectionstring="data source=(localdb)\v11.0;initial catalog=dev_scheduler;integrated security=sspi;" providername="system.data.sqlclient" /> </connectionstrings> <appsettings> <add key="aspnet:usetaskfriendlysynchronizationcontext" value="true" /> </appsettings> <system.web> <compilation debug="true" targetframework="4.5.1" /> <httpruntime targetframework="4.5.1" executiontimeout="1599999" /> <customerrors mode="off"/> <membership defaultprovider="simple"> <providers> <add name="simple" type="webmatrix.webdata.simplemembershipprovider, webmatrix.webdata"/> </providers> </membership> </system.web> <system.servicemodel> <services> <!--<service name="cygnus.dev.jobdispatcherwcfservice.jobdispatcherwcf"> <endpoint address="" behaviorconfiguration="restfulbehavior" binding="webhttpbinding" bindingconfiguration="web" contract="cygnus.dev.jobdispatcherwcfservice.ijobdispatcherwcf"></endpoint> </service>--> <service name="schedulerwcf.scheduler" behaviorconfiguration="servicebehavior"> <!--<host> <baseaddresses> <add baseaddress=""/> </baseaddresses> </host>--> <endpoint binding="webhttpbinding" contract="schedulerwcf.ischeduler" behaviorconfiguration="webhttp"/> <endpoint address="mex" binding="mexhttpbinding" contract="schedulerwcf.ischeduler" /> </service> </services> <behaviors> <!--<endpointbehaviors> <behavior name="restfulbehavior"> <webhttp helpenabled="true"/> </behavior> </endpointbehaviors>--> <servicebehaviors> <behavior name="servicebehavior" > <servicemetadata httpgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> </behavior> <behavior> <!-- avoid disclosing metadata information, set values below false before deployment --> <servicemetadata httpgetenabled="true" httpsgetenabled="true"/> <!-- receive exception details in faults debugging purposes, set value below true. set false before deployment avoid disclosing exception information --> <servicedebug includeexceptiondetailinfaults="true"/> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="webhttp"> <webhttp/> </behavior> </endpointbehaviors> </behaviors> <protocolmapping> <add binding="basichttpsbinding" scheme="https" /> </protocolmapping> <servicehostingenvironment aspnetcompatibilityenabled="false" multiplesitebindingsenabled="true" /> </system.servicemodel> <system.webserver> <modules runallmanagedmodulesforallrequests="true"/> <!-- browse web app root directory during debugging, set value below true. set false before deployment avoid disclosing web app folder information. --> <directorybrowse enabled="true"/> </system.webserver> </configuration>
below code of wcf service
public class scheduler : ischeduler { #region [constructors] public scheduler() { if (!websecurity.initialized) websecurity.initializedatabaseconnection("es_securitycontext", "userprofile", "userid", "username", autocreatetables: true); } #endregion #region [ping test methods] public string getsum(int x, int y) { return new javascriptserializer().serialize(new { sum = x + y, message = "this sum" }); } #endregion #region [methods] public compositetype getdatausingdatacontract(compositetype composite) { if (composite == null) { throw new argumentnullexception("composite"); } if (composite.boolvalue) { composite.stringvalue += "suffix"; } return composite; }