1 System.ServiceModel.DomainServices.Hosting is not found
问题描述:
I have a project with SL4 that works fine in dev computer, but when I upload it to the production server I get: Could not load file or assembly ‘System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified
解决方案:
依次检查下面三项
1) System.ServiceModel.DomainServices.Hosting.dll, System.ServiceModel.DomainServices.Server.dll and System.ServiceModel.DomainServices.Hosting.OData.dll should be added to the bin folder of the web application (Select the assembly in the list of references, press F4, set Copy Local property to True). We need to do it because not all hosting providers install Wcf Ria Services on their hosting environments;

2) Uncheck Enable Integrated Windows Authentication and check the Allow Anonymous Access option in the settings of a virtual folder;
3) Change <authentication mode=”Windows” /> to Forms in the web.config file.
(更多…)
1、在App.xaml中引用命名空间
xmlns:Primitives=”clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data”
xmlns:Controls=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data”
2、添加全局资源
<Application.Resources>
<!–DataGrid–>
<!–表头样式–>
<Style x:Key=”DataGrid_Header_Left” TargetType=”Primitives:DataGridColumnHeader”>
<Setter Property=”VerticalAlignment” Value=”Center” />
<Setter Property=”HorizontalContentAlignment” Value=”Left” />
</Style>
<Style x:Key=”DataGrid_Header_Center” TargetType=”Primitives:DataGridColumnHeader”>
<Setter Property=”VerticalAlignment” Value=”Center” />
<Setter Property=”HorizontalContentAlignment” Value=”Center” />
</Style>
<Style x:Key=”DataGrid_Header_Right” TargetType=”Primitives:DataGridColumnHeader”>
<Setter Property=”VerticalAlignment” Value=”Center” />
<Setter Property=”HorizontalContentAlignment” Value=”Right” />
</Style>
(更多…)
这个是从verycd上一集一集的摘选过来的,没有功劳也有苦劳的吧。
先从下面的网址中把下载列表下来,然后打开迅雷,点击迅雷软件顶部 文件 菜单,里面有个导入现在列表,导入刚才下载的文件。就可以了。一共是45集。
下载地址:http://u.115.com/file/f9af118c39。
如果此地址不可用了,请留言。我通过邮箱给你发过去。
开发环境:VS2008,silverlight3
需求:创建树控件,如果有子节点,则在展开节点的时候动态加载其子节点。
问题:为了实现这样的效果,我对每个节点进行了判断,看其是否有子节点,如果有则加一个临时子节点,当展开这个节点的时候再把临时节点删除,随后再动态循环加载其真正的子节点,这个在第一次加载的时候是没有什么问题的。即展开节点,会正确的显示出其下的子节点。但是当我点击刷新按钮(从新加载了一次树控件)后,再去触发节点的展开事件时会提示“值不在预期的范围内”的错误。然后逐步调试也没有发现什么异常情况。 (更多…)