2010-11-10 43 views
1

這使我瘋狂,我似乎無法找到我需要的東西。我的問題似乎是這篇文章的地址:http://timheuer.com/blog/archive/2009/12/10/tips-to-deploy-ria-services-troubleshoot.aspxsilverlight 4部署:system.web.ria缺失?

這是:我有這個silverlight應用程序,和一些花哨的web服務,他們工作grrreat!除非我實際上是在我的開發機器或服務器上設置它。

相信我已經安裝了所有需要的東西,但system.web.ria不存在於全局程序集緩存中,也不是我可以包含在我的項目引用中的東西。爲什麼在我使用visual studio的開發/調試服務器時甚至可以運行,這對我來說是個謎。

這可能是什麼原因造成的?

+0

好吧,看起來問題可能是我們使用的是針對舊版Silverlight或其他東西編譯的庫,並且System.Web.Ria已棄用。這完全是巫術。 – Lunpa 2010-11-10 22:47:40

回答

2

System.Web.Ria已不存在。它已被替換爲System.ServiceModel.DomainServices.ServerSystem.ServiceModel.DomainServices.Hosting名稱空間。

你還需要更新你的web.config,所以它讀取:

<?xml version="1.0"?> 
    <configuration> 
     <system.web> 
      <httpModules> 
       <add name="DomainServiceModule" 
type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, 
     System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, 
     Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      </httpModules> 
      <compilation debug="true" targetFramework="4.0" /> 
     </system.web> 

     <system.webServer> 
      <validation validateIntegratedModeConfiguration="false"/> 
      <modules runAllManagedModulesForAllRequests="true"> 
       <add name="DomainServiceModule" preCondition="managedHandler" 
type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, 
     System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, 
     Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      </modules> 
      <validation validateIntegratedModeConfiguration="false" /> 
     </system.webServer> 

    <system.serviceModel> 
     <serviceHostingEnvironment aspNetCompatibilityEnabled="true" 
            multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
</configuration> 

詳細內容可以在Breaking Changes from Beta(PDC 09) to RTW文檔(DOCX文件)中找到。

我不知道爲什麼這是從Visual Studio工作,除非它仍然有一些它使用的緩存文件。

+0

太棒了!這正是我所期待的! – Lunpa 2010-11-11 20:11:35