2011-08-16 48 views
1

我們正試圖在沒有SP1的舊服務器上運行帶有RIA Services SP1的Silverlight 4.0。我們將所有DLL複製到本地BIN文件夾中,複製本地設置爲True,特定版本設置爲True,但我們仍然在下面出現「複雜類型」錯誤。Silverlight RIA Services複雜類型錯誤在服務器上

WebHost failed to process a request. 
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/7339810 
Exception: System.ServiceModel.ServiceActivationException: The service '/Linebacker/Services/FCSAmerica-Linebacker-Web-DomainServices-LinebackerDomainService.svc' cannot be activated due to an exception during compilation. The exception message is: Operation named 'SearchCustomers' does not conform to the required signature. Return types must be an entity, collection of entities, or one of the predefined serializable types.. ---> System.InvalidOperationException: Operation named 'SearchCustomers' does not conform to the required signature. Return types must be an entity, collection of entities, or one of the predefined serializable types. 
    at System.ServiceModel.DomainServices.Server.DomainServiceDescription.ValidateMethodSignature(DomainOperationEntry method) 
    at System.ServiceModel.DomainServices.Server.DomainServiceDescription.AddInvokeOperation(DomainOperationEntry method) 
    at System.ServiceModel.DomainServices.Server.DomainServiceDescription.Initialize() 
    at System.ServiceModel.DomainServices.Server.DomainServiceDescription.CreateDescription(Type domainServiceType) 
    at System.ServiceModel.DomainServices.Server.DomainServiceDescription.<>c__DisplayClass8.<GetDescription>b__7(Type type) 
    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) 
    at System.ServiceModel.DomainServices.Server.DomainServiceDescription.GetDescription(Type domainServiceType) 
    at System.ServiceModel.DomainServices.Hosting.DomainServiceHost..ctor(Type domainServiceType, Uri[] baseAddresses) 
    at System.ServiceModel.DomainServices.Hosting.DomainServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) 
    at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath) 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) 
    --- End of inner exception stack trace --- 
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) 
    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) 

這就是我們的代碼在域服務中的樣子......它是一個圍繞WCF調用而不是實體對象的包裝。

[Invoke] 
    public IEnumerable<Customer> SearchCustomers(string searchValue) 
    { 
     return new List<Customer>(); 
    } 

我們是否需要在主機服務器上安裝SP1? 這會影響在那裏運行的舊版Silverlight嗎? 我們是否缺少屬性或其他?

我們已經基本上將每個本地dll本地複製到主機bin文件夾,並在我們的開發機器上的庫文件夾中引用相同的內容。

事情在我們的開發人員機器上運行良好,但不在服務器上運行。

感謝 Qui_Jon

回答

2

我已經有很多嘗試使用它不具有安裝在其上WCF RIA服務1.0 SP1的服務器上ComplexObjects使用WCF RIA服務相同的問題。你的問題的簡短答案是,是的,你需要在服務器上安裝WCF RIA Services V1.0 SP1。它不應該影響在那裏運行的其他東西。

當您運行安裝程序時,它可能會抱怨找不到Visual Studio。如果是這樣,請退出安裝程序,打開命令提示符,切換到包含RiaServices.msi安裝程序的目錄,並運行以下命令:

 
msiexec /i RiaServices.msi SERVER=TRUE 
+0

然而,這工作在試圖保持我們的IIS服務器儘可能通用,我們做的BIN部署,因此我們沒有安裝這些類型的框架,並對其進行管理。 –

+0

我們在部署到客戶系統時遇到類似的問題,並且由於僅安裝了RIA Service 1.0而導致此錯誤失敗。我們的情況更加有趣,因爲一些服務起作用,而其他服務則不起作用(取決於簽名是否需要SP1)。看起來安裝在系統上會覆蓋文件的bin部署,您需要卸載1.0或安裝SP1。 –

1

所以在這裏是問題。

我們已經在RIA SP1的本地開發機器上構建並運行了複雜類型與RIA,沒有任何問題。

我們的部署包裝了所有這些DLL並將它們部署到我們的開發Web服務器上的IIS,然後我們得到了它必須是像Entity這樣的支持類型的錯誤。

因此,我們查看了開發服務器上的GAC,並安裝了RDA的舊版本,並且在GAC中,它具有與使用我們的IIS安裝部署的SP1版本相同的版本。

因此,GAC超越了我們的DLL,並且我們從未參考SP1解決方案部署的SP1 dll。

由於我們不想在我們的Web服務器上安裝RIA,而且這是原始RIA服務的「垃圾」安裝,我們只是將其卸載,然後我們部署的SP1 dll被正確引用並且問題得到解決。

其他解決方案本來是用上面顯示的命令行選項安裝RIA SP1。

感謝您的答覆大家...

相關問題