我想在我的舊網絡服務來獲取一個字符串,但它給我的遠程服務器返回錯誤: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謝謝。
嗨!我將MessageLogging放在我的Web服務 和我的客戶端中的web.config中的Web.Config中,但其traces.svclog爲空。 – xscape 2010-05-28 03:15:15
+1「這只是WCF用來說出錯的一般錯誤」 – MCS 2011-01-05 16:36:46