【问题标题】:end point not found in wcf restful service through iis通过 iis 在 wcf restful 服务中找不到端点
【发布时间】:2015-04-05 01:05:45
【问题描述】:
    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;
            }

}

服务文件接口: 服务文件: [服务合同] 公共接口 IService1 { [运营合同] [WebGet(UriTemplate = "CheckLoginDetails/{UN}/{P}")] bool CheckLoginDetails(string UN, string P); }

【问题讨论】:

    标签: wcf


    【解决方案1】:

    对不起,我忘了在 url 中给出方法名称。 网址应该是: http://localhost/WcfService1/Service1.svc/CheckLoginDetails/kuna/hai

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-12-10
      • 2012-01-25
      • 1970-01-01
      • 2013-10-29
      • 2012-06-30
      • 1970-01-01
      • 2018-06-10
      相关资源
      最近更新 更多