使用firebug控制台輸出錯誤:
Unhandled Error in Silverlight Application 查詢“GetFlow_Process”的 Load 操作失敗。遠程服務器返回了錯誤: NotFound。 位於 System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
位於 System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
位於 System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult) 位於 System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )
分析
通過上述異常信息,只能夠看出是調用 DomainServices 時發生了異常。為了獲得詳細的異常信息,必須直接訪問 DomainServices,程序中的 DomainService 類名是 DefaultAuthSample.Web.AuthenticationService.svc,轉換成 url 是 http://YourServer/DefaultAuthSample-Web-AuthenticationService.svc。訪問后出現以下的錯誤信息:
------------------------
IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.
------------------------
看到這個異常信息
解決
在 IIS 中打開虛擬目錄的屬性頁(見上圖),把集成windows身份驗證取消。
如果sliverlight項目上還運行不起來的話,就檢查iis是否設置一下幾項:
其次就是同一項目給不同客戶,要求在不同網站下,最好將各個網站分布在不同的應用池下,如圖: