Geethuja Tom

Geethuja Tom

  • NA
  • 9
  • 1.8k

Consuming JSON service error in WCF

Sep 25 2013 12:47 AM
I follow the article : http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/consuming-json-service-in-windows-8-html5-metro-app/
I fetch this problem
 
I develop one wcf service application in visual studio express 2012 for web. I got this error while during WCF TEST CLIENT.
 
Error: Cannot obtain Metadata from http://localhost:65504/Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:65504/Service1.svc Metadata contains a reference that cannot be resolved: 'http://localhost:65504/Service1.svc'. There was no endpoint listening at http://localhost:65504/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. The remote server returned an error: (404) Not Found.HTTP GET Error URI: http://localhost:65504/Service1.svc The HTML document does not contain Web service discovery information.
 
HOW CAN I SOLVE THIS ERROR?
  1. <?xml version="1.0"?>  
  2. <configuration>  
  3.   <system.web>  
  4.     <compilation debug="true" targetFramework="4.0" />  
  5.   </system.web>  
  6.   <system.serviceModel>  
  7.         
  8.       <services>  
  9.         <service name="kkk.Service1">  
  10.           <endpoint name ="RESTEndPoint"  
  11.           contract ="kkk.IService1"  
  12.           binding ="webHttpBinding"  
  13.           address ="rest"  
  14.          behaviorConfiguration ="restbehavior"/>  
  15.         </service>  
  16.       </services>  
  17.         
  18.         <behaviors>  
  19.           <serviceBehaviors>  
  20.             <behavior name="ServiceBehavior">  
  21.               <serviceDebug includeExceptionDetailInFaults="false" />  
  22.               <serviceMetadata httpGetEnabled="true" />  
  23.             </behavior>  
  24.           </serviceBehaviors>  
  25.           <endpointBehaviors>  
  26.             <behavior name="restbehavior">  
  27.               <webHttp/>  
  28.             </behavior>  
  29.           </endpointBehaviors>  
  30.         </behaviors>  
  31.    
  32.     </system.serviceModel>  
  33.  <system.webServer>  
  34.     <modules runAllManagedModulesForAllRequests="true"/>  
  35.     <directoryBrowse enabled="true"/>  
  36.   </system.webServer>  
  37. </configuration>  
 

Answers (2)