1
votes

I'm trying to retrieve a string in my old webservice but it give me an error of

The remote server returned an error: NotFound.

and its InnerException is

{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.b__4(Object sendState) at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.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)}

this is the method where error prompted, this method returns a string format

void client_ValidateUserEncryptedCompleted(object sender, DummyWS.ValidateUserEncryptedCompletedEventArgs e)
    {
        object token = e.Result;
        client = new DummyWS.MachineHistoryWSSoapClient();
        if (token != null)
        {
            client.GetSummaryXMLAsync(token, "", "");
        }
    }

I am currently using Silverlight 4.0 and my ServiceReferences.ClientConfig is

<configuration>
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="MachineHistoryWSSoap" maxBufferSize="2147483647"
                maxReceivedMessageSize="2147483647">
                <security mode="None" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://localhost/MHVwsModified/MachineHistoryWS.asmx"
            binding="basicHttpBinding" bindingConfiguration="MachineHistoryWSSoap"
            contract="DummyWS.MachineHistoryWSSoap" name="MachineHistoryWSSoap" />
    </client>
</system.serviceModel>

My Web.Config in my web service is

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
    <compilation debug="true">
        <assemblies>
            <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /></assemblies></compilation>
    <authentication mode="Windows" />
</system.web>
<system.webServer>
    <directoryBrowse enabled="true" />
</system.webServer>

Any help will be aprreciated thank you.

2

2 Answers

2
votes

That particular error can mean anything, it is just the generic error that WCF uses to say "something went wrong". Tracing it is easy enough, just refer to the log generated by the Service Trace Viewer tool from Microsoft. Read about it right here. It will spit out a log file in the folder of your choice, and using the trace viewer you will quickly spot the faulty call.

1
votes

I solved this problem by debugging my legacy web service. Its a missing dll. Steps on how to debug is in here.