c# - WCF Rest WebHttpBinding Cannot Find endpoint -
i cannot find service endpoint after hosting in mvc application, when debug can base class of service , service class after
endpoint not found.
i call https://localhost:44302/api/brokerapi/provideaccountholdings/ goes method
[brokerserviceaspect(attributetargetelements = multicasttargets.method)] [iploggingaspect(attributetargetelements = multicasttargets.instanceconstructor)] [servicebehavior(addressfiltermode = addressfiltermode.any, instancecontextmode = instancecontextmode.percall, includeexceptiondetailinfaults = true)] [aspnetcompatibilityrequirements(requirementsmode = aspnetcompatibilityrequirementsmode.allowed)] public class brokerapiservice : servicebase, ibrokerapiservice, iiplog { //log pc data // iplog log = null; //public brokerapiservice() //{ // iplogutility iplog = new iplogutility(); // log = iplog.logip(operationcontext.current); //} public brokerapiservice() : base() { } public ienumerable<domain.model.holding> provideaccountholdings() { return db.provideaccountholdings(); }
from interface
[servicecontract( sessionmode = sessionmode.allowed, protectionlevel = system.net.security.protectionlevel.none)] public interface ibrokerapiservice { [operationcontract] [webget(responseformat = webmessageformat.json)] [faultcontract(typeof(generalexception))] ienumerable<holding> provideaccountholdings();
i have tried adding
uritemplate = "/providetransactions"
to no avail, there missing? here configuration
<webhttpbinding> <binding name="webhttpbinding" bypassproxyonlocal="false"> <security mode="transport"> <!--<transport clientcredentialtype="basic" />--> </security> </binding> </webhttpbinding> </bindings> <services> <service behaviorconfiguration="webbehaviour" name="aos.brokerapi.wcfservice.brokerapiservice"> <endpoint address="mex" binding="mexhttpbinding" name="mex" contract="imetadataexchange" /> <endpoint address="brokerapi" binding="webhttpbinding" bindingconfiguration="webhttpbinding" name="web" contract="aos.brokerapi.wcfservice.ibrokerapiservice" behaviorconfiguration="endpointbehaviour"/> <host> <baseaddresses> <!--<add baseaddress="http://localhost:8733/design_time_addresses/aos.brokerapi.wcfservice/brokerapiservice/" /> <add baseaddress="https://localhost:8732/design_time_addresses/aos.brokerapi.wcfservice/brokerapiservice/" />--> </baseaddresses> </host> </service> </services> <behaviors> <endpointbehaviors> <behavior name="endpointbehaviour"> <!--<enablewebscript />--> <webhttp faultexceptionenabled="false" /> </behavior> </endpointbehaviors>
thanks in advance.
Comments
Post a Comment