silverlight The type exists in both and DataContractSurrogates

只愿长相守 提交于 2019-12-10 15:23:00

问题


I'm using silverlight 4 with ria serivces ..
I got an error said :

The type 'eLab.Web.SessionsHWFile' exists in both 'eLab.Web.dll' and 'DataContractSurrogates_c96b3601-cd13-4049-93bb-e7b3f59a4fd9'

where eLab.Web is the aspx web project that hosts the silverlight project, and SessionsHWFile is an edmx entity ,it's not a real table in DB, it's VIEW. I dragged a grid from the data source and doped it in XAML user control, and used a query to get the data from stored procedure in DB, but I'm getting the above error when I debug the code and expand the results view :
(source: 0zz0.com)

I did this ,adding a view and getting the results from SP in DB, like a million time and nothing happened until this time ..


回答1:


**I think I knew were the problem is ..
I discovered that you can't name two "riaControls:DomainDataSource" with the same Name, even if they're int different xaml pages.

Honestly I don't know why yet, but that's how I fixed the problem ..

Just change the Name property of the "riaControls:DomainDataSource" ...**



来源:https://stackoverflow.com/questions/3339476/silverlight-the-type-exists-in-both-and-datacontractsurrogates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!