Click here to Skip to main content
15,886,665 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi I am having an WCF sync Service hosting on IIS7 on my server, I can access the URL in browser, Actually i built the WCF service and later on i added a wcf service website to my solution by adding my wcf service reference. and in the service.svc file i mentioned the particular service. the web.config in the wcf site looks like

XML
<configuration>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="SimGuru_WCF.SimGuruDBCacheSyncService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
          contract="SimGuru_WCF.ISimGuruDBCacheSyncContract">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="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>
    </behaviors>
  </system.serviceModel>
</configuration>

When i am trying to access the service it is giving me the "The remote server returned an error: (404) Not found" but still i can access the service through URL

can some one please help me to sort this issue out

Thanks in advance
Posted
Updated 4-Jun-20 0:11am

The problem is in your project that consumes the WCF. The server works ok.

Did you add service reference on your "client" project?

Hope it helps.
 
Share this answer
 
Comments
SREEKAN2 30-Aug-12 10:46am    
My client project is a windows mobile project there is no option to add service reference there are only provision to add web reference and reference
Thanks
Christian Amado 30-Aug-12 10:48am    
Add web reference :) Your wcf must be published first.
SREEKAN2 30-Aug-12 11:10am    
Yes i already done that one the error is coming in the reference.cs file
SREEKAN2 30-Aug-12 12:04pm    
Now I am getting {"The remote server returned an error: (500) Internal Server Error."} error
SREEKAN2 30-Aug-12 12:04pm    
Is there any thing to do with end points?
I got it, using trace i was able to sort my problem

XML
<diagnostics>
                         <messagelogging maxmessagestolog="30000">
                                 logEntireMessage="true" 
                                 logMessagesAtServiceLevel="true" 
                                 logMalformedMessages="true" 
                                 logMessagesAtTransportLevel="true">
                         </messagelogging>
                 </diagnostics>
  
<system.diagnostics>
                 <sources>
                         <source name="System.ServiceModel">
                                 switchValue="Verbose, ActivityTracing" 
                                 propagateActivity="true" >
                                 <listeners>
                                         <add name="xml" />
                                 </listeners>
                         </source>
                         <source name="System.ServiceModel.MessageLogging">
                                 switchValue="Verbose">
                                 <listeners>
                                         <add name="xml" />
                                 </listeners>
                         </source>
                 </sources>
                 <sharedlisteners>
                         <add name="xml">
                              type="System.Diagnostics.XmlWriterTraceListener" 
                              initializeData="e2eTraceTest.e2e" />
                 </add></sharedlisteners>
                 <trace autoflush="true" />
         </system.diagnostics>

The Trace viewer explained me where i am doing wrong one thing is that security issues with the sql server, and more over i don't even have a connection string property in my web. config file i have one on wcf service but not on wcf web site Any how it is solved

thanks all for your co-operation
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900