簡體   English   中英

IIS 5上的Silverlight 5 WCF Ria服務404錯誤

[英]Silverlight 5 WCF Ria Services 404 Error on IIS 5

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

消息:Silverlight應用程序中的未處理錯誤加載操作查詢“登錄”失敗。 [HttpWebRequest_WebException_RemoteServer]參數:NotFound調試資源字符串不可用。 通常,密鑰和參數提供了足夠的信息來診斷問題。 在System.ServiceModel上的System.ServiceModel.DomainServices.Client.OperationBase.Complete(異常錯誤)中查看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上的System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation。<> c_ DisplayClass1.b _0(對象狀態)中的.DomainServices.Client.ApplicationServices.AuthenticationOperation.End(IAsyncResult結果) System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()中System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult)的.RunInSynchronizationContext(SendOrPostCallback回調,對象狀態)
System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete(OperationBase操作)在System.ServiceModel.DomainServices.Client.LoadOperation。<> c_ DisplayClass4 1.<Create>b__0(LoadOperation System.ServiceModel.DomainServices上的1.<Create>b__0(LoadOperation 1 arg) System.ServiceModel.DomainServices.Client上的System.ServiceModel.DomainServices.Client.LoadOperation.Complete(異常錯誤)處的System.ServiceModel.DomainServices.Client.OperationBase.Complete(異常錯誤)中的.Client.LoadOperation`1.InvokeCompleteAction() System.ServiceModel.DomainServices.Client.DomainContext上的.DomainContext.CompleteLoad(IAsyncResult asyncResult)。<> c _DisplayClass1b.b__17(Object)

我該如何解決這個錯誤?
在Windows 7機器上的IIS 7上成功托管的應用程序和wcf ria也一樣。
更新:使用Fiddler后我發現我的應用程序錯誤是404,Silverlight無法找到Ria Services。

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文件,並查看詳細信息。

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

我認為命令是RiaService.msi Server = true

重新安裝后,嘗試直接在Web瀏覽器上訪問您的服務。 您的服務的URL將是http://YOURDOMAIN.COM/YourAPP/Full-NameSpace-Of-Class.svc

在命名空間中,你必須用破折號( - )改變點(。)

如果它沒有返回響應,那么您必須驗證WCF已安裝並在IIS中注冊。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM