Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
WCF Service raises the Following Error

XML
{System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
   at Beacon.MemberWCF.MemberWCFClient.MemberWCFClientChannel.EndMemberInsert(IAsyncResult result)
   at Beacon.MemberWCF.MemberWCFClient.Beacon.MemberWCF.IMemberWCF.EndMemberInsert(IAsyncResult result)
   at Beacon.MemberWCF.MemberWCFClient.OnEndMemberInsert(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}


When debugged with Fiddler it shows:

HTTP/1.1 400 Bad Request

Can anyone Help me?

Thanks in Advance
Posted

Without seeing your .clientconfig file for your Silverlight app AND your web.config file for your service, we really can't help you.
 
Share this answer
 
My Web.Config file:

XML
<behaviors>
     <serviceBehaviors>
       <behavior name="">
         <serviceMetadata httpGetEnabled="true"/>
         <serviceDebug includeExceptionDetailInFaults="true"/>
       </behavior>
     </serviceBehaviors>
   </behaviors>
   <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
 </system.serviceModel>
 <system.diagnostics>
   <sources>
     <source name="System.ServiceModel"
             switchValue="Information, ActivityTracing"
             propagateActivity="true">
       <listeners>
         <add name="traceListener"
             type="System.Diagnostics.XmlWriterTraceListener"
             initializeData= "c:\log\wcfProject1Tracess.svclog" />
       </listeners>
     </source>
   </sources>
 </system.diagnostics>
 <system.web>
   <compilation debug="true"/>
   <httpRuntime maxRequestLength="32768" />
 </system.web>



My ServiceReference.ClientConfig file:

XML
<configuration>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IActionsWCF"
            closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:02:00" sendTimeout="00:01:00" maxReceivedMessageSize="4194304"  maxBufferSize="4194304">
          <security mode="None" />
        </binding>

XML
<client>
      <endpoint address="http://localhost:3178/ActionsWCF.svc" binding="basicHttpBinding"
          bindingConfiguration="BasicHttpBinding_IActionsWCF" contract="ActionsWCF.IActionsWCF"
          name="BasicHttpBinding_IActionsWCF" />

MSIL
</client>
  </system.serviceModel>
</configuration>
 
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