views:

121

answers:

3

I have a WCF service method in a Silverlight application that inserts some data into a SQL Server database deployed on a shared GoDaddy server. Some of the methods work, and some do not, but all of them work when the application is run locally (with a local database). I get the generic "The remote server returned an error: NotFound", and I can't seem to get any more info. When I run the method directly from the service class (not through the service reference), it works correctly. Here is the service part of my web.config:

<system.serviceModel>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
   <behaviors>
     <serviceBehaviors>
       <behavior name="default">
         <serviceMetadata httpGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="true" />
         <dataContractSerializer maxItemsInObjectGraph="6553600" />
       </behavior>
     </serviceBehaviors>
   </behaviors>

   <bindings>
     <basicHttpBinding>
       <binding name="BasicHttpBinding_IncreasedBuffer" 
                maxBufferSize="2147483647" maxBufferPoolSize="2147483647" 
                maxReceivedMessageSize="2147483647">
         <readerQuotas maxBytesPerRead="2147483647" maxDepth="2147483647" 
              maxArrayLength="2147483647" maxNameTableCharCount="2147483647"/>
       </binding>
     </basicHttpBinding>
   </bindings>
   <services>
     <service name="GreekTools.Services.DataService"
        behaviorConfiguration="default">
       <endpoint address="" binding="basicHttpBinding" 
                 bindingConfiguration="BasicHttpBinding_IncreasedBuffer"
                 contract="GreekTools.Contracts.IDataService" />
       <endpoint address="mex" binding="mexHttpBinding" 
                 contract="IMetadataExchange" />
     </service>
   </services>
 </system.serviceModel>

Any ideas?

+1  A: 

You might want to enable WCF logging as well. But please post your endpoint configuration.

David Andres
+1  A: 

This is usually the case when you attempt to do a request on a url that does not exist. For example, you expect a service to be at http://hostname/path/Service.svc but it actually lives at http://hostname/Service.svc.

Your best course of action is to download a web debugging tool (Fiddler is a good choice) and check the actual requests that are sent from your Silverlight client to your web server. Very probably you'll see some problem with a url path that's incorrect.

Ronald Wildenberg
+1  A: 

Could it be that you have an older version of the dll deployed on the server side. That would explain why some work and some do not.

If this is not the case, is there any pattern in what works and what does not?

Shiraz Bhaiji