随笔-13  评论-15  文章-0  trackbacks-0
  2011年3月15日

(1)http://blogs.msdn.com/b/digital_ruminations/archive/2010/10/28/complextypes-in-ria-services.aspx

(2)http://smehrozalam.wordpress.com/2010/11/24/ria-services-sending-complex-types-to-the-client/

posted @ 2011-03-15 17:04 DhuXin 阅读(132) 评论(0) 编辑
  2011年2月24日

错误描述:

(1)System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetOptionsIntTypes'. 在映射和元数据信息中找不到指定的默认 EntityContainer 名称“WMOSOptionsEntities”。参数名: defaultContainerName

(2)System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetOptionsIntTypes'. 无法加载指定的元数据资源。(Unable to load the specified metadata resource)

解决方法:

http://www.cnblogs.com/jyz/archive/2009/03/12/1409714.html

posted @ 2011-02-24 09:36 DhuXin 阅读(416) 评论(0) 编辑
  2011年2月22日

出现问题:WCF RIA DomainService与Net.Tcp Binding/Net.pipeBinding等非Htttp绑定无法兼容

中文描述:提供的URI方案"net.tcp"无效,应为"http";

英文描述:The provided URI scheme 'net.tcp' is invalid; expected 'http'. Parameter name: context.ListenUriBaseAddress

问题原因:

(1)http://www.cnblogs.com/2018/archive/2010/10/25/1860746.html

(2)http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/d6388487-27c1-4023-9825-71fb50596a8f

(3)http://forums.silverlight.net/forums/p/208892/493804.aspx#493804

解决方法1:

(1)在web服务端,创建类MyDomainServiceHostFactory

using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.DomainServices.Hosting;
namespace WMOS.Web
{
    public class MyDomainServiceHostFactory : DomainServiceHostFactory
    {
        private static List<string> _allowedSchemes;
        static MyDomainServiceHostFactory()
        {
            MyDomainServiceHostFactory._allowedSchemes = new List<string>();
            MyDomainServiceHostFactory._allowedSchemes.Add(Uri.UriSchemeHttp);
            MyDomainServiceHostFactory._allowedSchemes.Add(Uri.UriSchemeHttps);
        }
        protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
        {
            baseAddresses = baseAddresses.Where(uri => MyDomainServiceHostFactory._allowedSchemes.Contains(uri.Scheme)).ToArray();
            return base.CreateServiceHost(serviceType, baseAddresses);
        }
    }
}
 

(2) 以例子工程中WMOSDomainService为例,注意这个服务的类型是:RIA domainService,在web.config配置文件配置如下

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" >
      <serviceActivations>
        <add service="WMOS.RIAService.Web.WMOSDomainService" relativeAddress="Services/WMOS-RIAService-Web-WMOSDomainService.svc" factory="WMOS.Web.MyDomainServiceHostFactory"/>
       </serviceActivations>
</serviceHostingEnvironment>


 

解决方法2: 

或者还可以按照如下方法做,第一步相同,第二步操作

(1)web服务端,创建扩展名是.svc的WCF服务文件,WCF服务是:WMOS.RIAService.Web.WMOSDomainService,文件命名应当把“.”用“-”代替,例如:WMOS-RIAService-Web-WMOSDomainService.svc,严格按照这个规则命名。

(2)文件内容如下

<%@ ServiceHost Language="C#" Debug="true" Service="WMOS.RIAService.Web.WMOSDomainService" Factory="WMOS.Web.MyDomainServiceHostFactory" %>
注:不兼容的问题就出在Factory上。


附:

(1)Silverlight4 配置WCF net.tcp绑定宿主在IIS时应注意的几个问题

(2)WCF NET.TCP Protocol in Silverlight

(3)当Silverlight同时遇上TCP和HTTP的WCF服务

更新:

最新版本的RIA已经解决此问题,升级版本即可

posted @ 2011-02-22 15:18 DhuXin 阅读(400) 评论(0) 编辑
  2011年2月21日
一个或多个activex 控件无法显示

这是升级flash出现的bug,我之前有道也是这样的,后来删掉后当即就可以了

打开注册表编辑器,定位到

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0

1、如果侧窗格中的1200的值为3,则改成0

2、如果Zones下,即左侧0 上有一个方块的值,删除

image

posted @ 2011-02-21 16:40 DhuXin 阅读(842) 评论(0) 编辑

点击下载:WCF.NetTCP 绑定配置说明.pdf

相关文章:

Silverlight4 配合WCF net.tcp实现在线聊天应用攻略1

Duplex WCF Services Hosted in IIS  Using Net.Tcp (Google快照)

关于 IIS7 host WCF service支持netTCP协议问题

posted @ 2011-02-21 14:53 DhuXin 阅读(440) 评论(1) 编辑
  2010年11月1日

写下来备忘一下。

(1)问题:使用PollingDuplex绑定时,客户端Add Service Reference ,不能生成的客户端配置文件ServiceReference.clientConfig

解决方法: 使用slsvcutil.exe 生成,路径:C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Tools

(2)问题:使用slsvcutil.exe发生StackOverfIowExceation异常

解决方法:在slsvcutil.exe同一目录下创建文件slsvcutil.exe.config文件,添加如下内容

<configuration>
  <satelliteassemblies>
    <assembly name=”SISvcUtil, Version=4.0.0.0, Culture=neutral,
PubIicKeyToken=b03f5f7f11d50a3a"/>
  </satelliteassemblies>
</configuration>

(3)问题:wcf 超时,10分钟代理关闭

解决方法:同时在客户端和服务端配置InactivityTimeout、ReceiveTimeout默认lOmin,WCF端和Silverlight端是
各自独立的。例如:

服务端Web.Config/App.Config

<pollingDupIexBinding>
    <binding name=”NewBinding0"
        maxBufferSize="2147483647"
        maxBufferPooISize="2147483647"
        max Rece ived Messages ize="2147483647"
          transferMode=”Buffered”sendTimeout= "00:02:00"
        closeTimeout="00:02:00" openTimeout="00:02:00"
inactivityTimeout="01:00:00"  receiveTimeout="01:00:00"/>
</pollingDupIexBinding>
客户端ServiceReferences.ClientConfig/App.Config

<customBinding>
  <binding name=”PollingDupIexHttpBinding_ ITaskService"
    closeTimeout="00:02:00" openTimeout="00:02:00"
    sendTimeout="00:02:00"  receiveTimeout="01:00:00">
          <pollingDuplex duplexMode="SingIeMessagePerPoll”
            inactivityTimeout="01:00:00"/>
          <binaryMessageEncoding/>
        <httpTransport maxReceivedMessageSize="2147483647"
            maxBufferSize= "2147483647"/>
        </binding>
      </customBinding>

详细资料下载:wcf笔记

posted @ 2010-11-01 18:47 DhuXin 阅读(293) 评论(0) 编辑
    只有注册用户登录后才能阅读该文。阅读全文
posted @ 2010-11-01 18:23 DhuXin 阅读(144) 评论(1) 编辑
  2010年10月13日
摘要: 列名Id test no 1 hello 1 1 Jack 2 1 you 3 2 My 1 2 is Lilei 3 2 name 2如要得到以下结果:1 hello Jack you 2 My name is Lilei请写出sql语句我写的如下: DECLARE @tempTable TABLE ( id INT PRIMARY KEY, field NVARCHAR(500) NULL)D...阅读全文
posted @ 2010-10-13 10:38 DhuXin 阅读(80) 评论(2) 编辑
摘要: 一是查询A(ID,Name)表中第31至40条记录,ID作为主键可能是不是连续增长的列,完整的查询语句如下: select top 10 * fromA where ID >(select max(ID) from (select top 30ID fromA order by A) T) order by A以上转自:http://www.cnblogs.com/foson/service...阅读全文
posted @ 2010-10-13 10:15 DhuXin 阅读(244) 评论(0) 编辑
  2010年8月10日
摘要: 在Datagrid中添加LoadingRow事件,处理方法如下:ok,可以。这样做的原因是,在右键菜单删除当前条目时,防止误删除!代码不需做任何改动,即可使用!阅读全文
posted @ 2010-08-10 09:47 DhuXin 阅读(476) 评论(0) 编辑
仅列出标题  下一页