通过iis在wcf restful service中找不到终点

时间:2015-02-05 08:40:40

标签: wcf

    i am just checking whether the method is working or not .but i am getting end point not found .
    in the url i provided the link as below:
    http://localhost/WcfService1/Service1.svc/kuna/hai

   // my web.config file://
    <services>
          <service name="WcfService1.Service1">
            <endpoint address="" behaviorConfiguration="restfulBehaviour" binding="webHttpBinding" bindingConfiguration="" contract="WcfService1.IService1"></endpoint>
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost/WcfService1/Service1.svc"/>
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="restfulBehaviour">
              <webHttp/>
            </behavior>
          </endpointBehaviors>
        </behaviors>
   --------------------------------------------------------- 
    my service  file
jus passing two parameters as input and expecting true as o/p
    public class Service1 : IService1
        {
            public bool CheckLoginDetails(string UN, string P)
            {
                return true;
            }

}

服务文件的接口:         Iservice文件:         [服务合约]             公共接口IService1             {                 [OperationContract的]                 [WebGet(UriTemplate =“CheckLoginDetails / {UN} / {P}”)]                 bool CheckLoginDetails(字符串UN,字符串P);             }

1 个答案:

答案 0 :(得分:0)

抱歉,我忘了在网址中提供方法名称。 网址应该是: http://localhost/WcfService1/Service1.svc/CheckLoginDetails/kuna/hai