c# - WCF Rest SSL HTTPS simple GET -


when creating topic saw quite few unanswered ones can me out here.

  • i have simple wcf service hosted in iis.
  • i have associated "website" self assigned certificate
  • i can html page within , forces me proceed page (localhost test.htm)

i want access restful service , using fiddler mock request:

get > https://localhost/company/get 

request headers:

user-agent: fiddler host: localhost authorization: joe;bloggs 

get error 404.0 not found. imagine doing schoolboy?

thanks in advance, onam.

wcf code:

public class companyservice : icompanyservice {     public ienumerable<integration.business.objects.company> get()     {         list<integration.business.objects.company> c = new list<integration.business.objects.company>();         c.add(new integration.business.objects.company() { name = "blah" });         return c;     } }  [servicecontract] public interface icompanyservice {     [operationcontract]     [webget(uritemplate = "company/get")]     ienumerable<integration.business.objects.company> get(); } 

config file:

<?xml version="1.0"?> <configuration>   <system.servicemodel>     <services>       <service name="companyservice"                behaviorconfiguration="webhttpbehaviour_mango">         <endpoint address=""                   binding="webhttpbinding"                   bindingconfiguration="webhttpbinding_mango"                   behaviorconfiguration="webhttpbehaviour_mango"                   contract="icompanyservice">         </endpoint>       </service>     </services>     <behaviors>       <servicebehaviors>         <behavior name="webhttpbehaviour_mango">           <servicemetadata httpgetenabled="true" httpsgetenabled="true"/>           <servicedebug includeexceptiondetailinfaults="true"/>         </behavior>       </servicebehaviors>     </behaviors>     <bindings>       <webhttpbinding>         <binding name="webhttpbinding_mango">           <security mode="transport">             <transport clientcredentialtype="none"></transport>           </security>          </binding>       </webhttpbinding>     </bindings>   </system.servicemodel>   <startup>     <supportedruntime version="v4.0" sku=".netframework,version=v4.0"/>   </startup> </configuration> 


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -