Click here to Skip to main content
13,291,254 members (65,782 online)
Rate this:
Please Sign up or sign in to 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

      <service behaviorConfiguration="ServiceBehavior" name="SimGuru_WCF.SimGuruDBCacheSyncService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
            <dns value="localhost" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <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"/>

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 30-Aug-12 5:10am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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
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?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I got it, using trace i was able to sort my problem

                         <messagelogging maxmessagestolog="30000">
                         <source name="System.ServiceModel">
                                 switchValue="Verbose, ActivityTracing" 
                                 propagateActivity="true" >
                                         <add name="xml" />
                         <source name="System.ServiceModel.MessageLogging">
                                         <add name="xml" />
                         <add name="xml">
                              initializeData="e2eTraceTest.e2e" />
                 <trace autoflush="true" />

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171207.1 | Last Updated 30 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100