2013-04-14 85 views
4

我開發了一個使用Silverlight和WCF Ria Services的.an應用程序。
該應用程序必須是使用IIS 5的Windows XP計算機上的主機。
由於我在網上找到的信息,我部署了應用程序時沒有任何問題。
但現在當我的應用程序試圖執行我遇到這個錯誤首先WCF查詢:Silverlight 5 WCF Ria服務IIS 5上的404錯誤

消息:Silverlight應用程序載入操作 未處理的錯誤失敗查詢「登錄」。 [HttpWebRequest_WebException_RemoteServer] 參數:NotFound調試資源字符串不可用。關鍵和參數經常提供足夠的信息來診斷 問題。見 http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.10411.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer 處 System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End(IAsyncResult的 結果) System.ServiceModel.DomainServices.Client.OperationBase.Complete(例外 誤差)在 System.ServiceModel.DomainServices。 Client.ApplicationServices.AuthenticationOperation。 <> C_ DisplayClass1.b _0(對象 狀態)留在 System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback 回調,對象狀態) .HandleAsyncCompleted(IAsyncResult的 asyncResult)在 System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()
在 System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete(OperationBase 操作)在 System.ServiceModel .DomainServices.Client.LoadOperation。 <> C_ DisplayClass4 ARG)在 System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction() 處 系統 System.ServiceModel.DomainServices.Client.OperationBase.Complete(例外 錯誤)。 ServiceModel.DomainServices.Client.LoadOperation.Complete(例外 誤差)在 System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult的 asyncResult)在 System.ServiceModel.DomainServices.Client.DomainContext。 <>Ç _DisplayClass1b.b__17(對象 )

我怎樣才能解決這個問題?
應用程序成功託管在Windows 7機器上的IIS 7上,並且wcf ria也起作用。
更新:使用小提琴手後,我發現我的應用程序的錯誤是404,Silverlight無法找到Ria服務。

回答

0

NotFound表示在這種情況下在服務器上的任何錯誤。您需要獲取詳細的WCF日誌。 我建議你添加以下到Web.config文件以啓用WCF日誌記錄:

<configuration> 
    ... your regular configuration here ... 
    <system.diagnostics> 
    <sources> 
     <source name="System.ServiceModel" switchValue="All" propagateActivity="true"> 
     <listeners> 
      <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" 
initializeData="C:\wcflogs\your_wcf_service_log.svclog" /> 
     </listeners> 
     </source> 
    </sources> 
    </system.diagnostics> 
</configuration> 

然後你就可以打開服務跟蹤查看工具(SvcTraceViewer.exe).svclog文件 ,看看發生了什麼詳細。

+0

這是用於WCF還是WCF Ria服務? – Unforgiven

+0

RIA服務託管在WCF上,因此,兩者都是。 – Stas

+0

謝謝,這是404錯誤 – Unforgiven

0

嘗試在服務器上重新安裝RIA服務。

我認爲該命令是 RiaService.msi服務器=真

重新安裝時,儘量直接在Web瀏覽器訪問您的售後服務。你的服務的URL將在命名空間http://YOURDOMAIN.COM/YourAPP/Full-NameSpace-Of-Class.svc

,你將不得不改變由破折號點(。)( - )

,如果它不返回響應,那麼您必須驗證WCF是安裝並通過IIS註冊。