远程服务器返回错误:NOTFOUND
我想在我的旧网络服务来获取一个字符串,但它给我的远程服务器返回错误:NOTFOUND
The remote server returned an error: NotFound.
一个错误,它的InnerException是
{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)}
这是提示错误的方法,此方法返回字符串格式
void client_ValidateUserEncryptedCompleted(object sender, DummyWS.ValidateUserEncryptedCompletedEventArgs e)
{
object token = e.Result;
client = new DummyWS.MachineHistoryWSSoapClient();
if (token != null)
{
client.GetSummaryXMLAsync(token, "", "");
}
}
我目前使用Silverlight 4.0和我的Ser viceReferences.ClientConfig是
<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>
我在我的web服务Web.Config是
<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>
任何帮助将aprreciated谢谢。
这个特定的错误可能意味着什么,它只是WCF用来说“出错了”的一般错误。跟踪它很简单,只需参考Microsoft提供的服务跟踪查看器工具生成的日志即可。阅读关于它right here。它会在您选择的文件夹中吐出一个日志文件,使用跟踪查看器可以快速发现错误的呼叫。
嗨!我将MessageLogging放在我的Web服务 和我的客户端中的web.config中的Web.Config中,但其traces.svclog为空。 – xscape 2010-05-28 03:15:15
+1“这只是WCF用来说出错的一般错误” – MCS 2011-01-05 16:36:46