none
The remote server returned an error:Not found

    General discussion

  • Hi,

    I designed a form to send email via SL 4. When it gets to the below method, it throws the above message

     public bool EndSendEmail(System.IAsyncResult result) {
                    object[] _args = new object[0];
                    bool _result = ((bool)(base.EndInvoke("SendEmail", _args, result)));
                    return _result;
                }
    
    
    Do i need to add SOAP to my web.config? I have the following in my web config 
    <domainServices>
          <endpoints>
            <add name="OData" type="System.ServiceModel.DomainServices.Hosting.ODataEndpointFactory, System.ServiceModel.DomainServices.Hosting.OData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <!--<add name="JSON" type="Microsoft.ServiceModel.DomainServices.Hosting.JsonEndpointFactory, Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0,  Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
            <!--<add name="soap" type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory, Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />-->
          </endpoints>
        </domainServices>
        
    When I commented out soap object, my app doesn't connect to Database. When I exclude it from config file, my app. connects to the database.
    Does anyone know why I get the above error message when i try to send an email?
    Thanks,
    Kamal
    Saturday, July 30, 2011 5:34 AM

All replies

  • You will get a more detailed error message if you register to use the Client http stack.

    More Info:

    http://msdn.microsoft.com/en-us/library/system.net.browser.webrequestcreator%28v=vs.95%29.aspx

    Saturday, July 30, 2011 7:15 PM
  • I get the following message

    The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

    Server stack trace:
    at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at Iemail.SendEmail(String ClientName, String ClientEmail, String ClientPhone, String WebmasterEmail, Int32 BestWayToContactus, String Comment, String Subject)
    at IemailClient.SendEmail(String ClientName, String ClientEmail, String ClientPhone, String WebmasterEmail, Int32 BestWayToContactus, String Comment, String Subject)
    Sunday, July 31, 2011 9:08 AM
  • This doesn't appear to be an issue with the client.  The service is returning a fault excetion.  To get a detailed exception you can turn on IncludeExceptionDetailInFaults.

    Sunday, July 31, 2011 10:02 AM
  • I turned it on but I do still get the same error message when I run it from my dev machine. If I test WCF service, it works perfectly. (using wcftestclient.exe)

    I get the error message at this level 

     public bool EndSendEmail(System.IAsyncResult result) {
    object[] _args = new object[0];
    bool _result = ((bool)(base.EndInvoke("SendEmail", _args, result)));
    return _result;
    }
    
    
    the above method is in SL project Service References folder inside reference.cs file.
    It is very fraustrating :-(
    Saturday, August 06, 2011 8:47 AM
  • Perhaps you will get some answers in this excellent video. It also gives you hints on how to deploy the suggestions given in the other replies given above.

    Good luck!

    Wednesday, August 10, 2011 5:43 PM
  • This is the general purpose exception in case "something" goes wrong during the call. It might be an infrastructure exception, or an exception on the server. To nail it down further...

    Actually I've written about that topic here: http://ajdotnet.wordpress.com/2010/08/29/communicationexception-notfound/

    HIH,

    Thursday, August 11, 2011 5:41 AM