我們正試圖在沒有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
然而,這工作在試圖保持我們的IIS服務器儘可能通用,我們做的BIN部署,因此我們沒有安裝這些類型的框架,並對其進行管理。 –
我們在部署到客戶系統時遇到類似的問題,並且由於僅安裝了RIA Service 1.0而導致此錯誤失敗。我們的情況更加有趣,因爲一些服務起作用,而其他服務則不起作用(取決於簽名是否需要SP1)。看起來安裝在系統上會覆蓋文件的bin部署,您需要卸載1.0或安裝SP1。 –