Click here to Skip to main content
12,621,228 members (36,398 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: WinMobile5 IIS WCF
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

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

Solution 2

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

<diagnostics>
                         <messagelogging maxmessagestolog="30000">
                                 logEntireMessage="true" 
                                 logMessagesAtServiceLevel="true" 
                                 logMalformedMessages="true" 
                                 logMessagesAtTransportLevel="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
  Permalink  

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 | Mobile
Web02 | 2.8.161128.1 | Last Updated 30 Aug 2012
Copyright © CodeProject, 1999-2016
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