登录
首页 » C# » WCF四种常用应用场景实例下载

WCF四种常用应用场景实例下载

于 2021-03-03 发布
0 249
下载积分: 1 下载次数: 0

代码说明:

使用注意:建立demo数据库,使用aspnet_regsql.exe建立Memmbership一些安全场景需要证书,使用CertTool的工具生成具体的授权时的角色和用户名字参考HostSvc、Client代码修改成测试用的后才能正常运行 一、目录结构Common来自于Programming WCF Services[ISBN: 978-0-596-80548-7],实现WCF的声明式安全HostSvc:不同场景的接口和服务实现,命令行承载服务MembershipAdmin:用于操作demo数据库membership的成员操作,Asp.net Configuraion 可添加角色和用户,并使用IIS服务承载HostSvc实现的服务Client: 使用各种服务的客户端场景 二、四种场景的区别:Intranet Transport保护 使用tcp绑定 windows集成的安全 Internet 只能使用Message形式的保护,需要数字证书 tcp wsHttp绑定 使用Membership进行安全认证 Anoymous 使用Message形式的保护,需要数字证书 tcp wsHttp绑定 None 消息不保护  http tcp wsHttp绑定 三、App-comment.config: 包含对于各种配置的说明 四、证书的生成:CertToolSetupCerts.bat生成,命令行工具从VS SDK已经拷贝过来 五、IIS中承载服务的注意: 需要把WCFServer赋予IIS的账号以权限 受信任人中加入WCFServer证书 六、证书如何管理:1、命令行启动mmc2、“添加、删除管理单元"加入"证书", 按照提示选择当前用户或本机3、此时即可管理IIS的权限操作: 在"个人/证书"下找到WCFServer,"更多操作/所有任务/管理私钥",弹出界面设置用户权限受信任人: 在"个人/证书"下找到WCFServer,导出证书,然后在”受信息人/证书“下导入以上证书即可 七、远程机器客户端的证书问题 导出WCFServer【不要私钥】 然后在远程客户端机器上导入即可,此时的公钥可以用于消息的验证 八、IIS中承载MembershipAdmin中加入了对应的四个.svc文件【逻辑使用的一个HostSvc中的实现】以提供WCF服务,具体配置和HostSvc一致,当然地址不一样了此例是把MembershipAdmin作为应程序发布到80端口的demo下 注意:1、需要设置IIS的http和net.tcp协议支持2、数据库demo需要能被IIS账号访问3、WCFServer证书需要能被IIS账号访问

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 封装HttpWebRequest常用方法
    封装HttpWebRequest常用方法
    2015-02-06下载
    积分:1
  • Fat-Tree
    基于opnet的胖树多播网络仿真,主要为多播算法的仿真,程序较完善(Opnet fat tree multicast network simulation, primarily for multicast algorithm based simulation program better)
    2021-02-08 15:09:54下载
    积分:1
  • udp
    用VC++编写一个简单的基于UDP通信实例!实现了客户端与服务器端的通信源代码!(Using VC++ to write a simple UDP based communication instance! To achieve the client and server-side communication source code! )
    2010-05-29 05:49:41下载
    积分:1
  • IC卡 刷卡控制 实例源码下载
    IC卡 刷卡控制 实例源码下载
    2015-03-15下载
    积分:1
  • MFCfeiqu
    实现简单的window局域网通信,即,传输文件。飞秋(Simple window LAN communications, that is, transmission file. Fei Qiu)
    2015-06-15 08:56:44下载
    积分:1
  • tcp-server-代码
    说明:  tcp服务器的代码(网上找的),说有点的源代码。(Tcp program code in vxworks)
    2020-06-20 14:20:01下载
    积分:1
  • Rc4Dlg
    RC4算法的加密实现,实现对明文的加密,加密效果很不错(RC4 encryption algorithm, has implemented an express right of encryption, encryption is very good effect)
    2006-06-13 15:10:44下载
    积分:1
  • BluetoothClientServer
    BLUETOOTH VC++ CLIENT SERVER
    2012-12-17 18:49:08下载
    积分:1
  • BOIL
    fluent的UDF程序,用于水变为冰的凝固计算(fluent in the UDF program for calculating the freezing water into ice)
    2021-04-16 19:58:53下载
    积分:1
  • 新建文件夹
    说明:  ◎ 为所有socket函数调用添加错误处理代码; ◎ 范例中服务器地址和端口是固定值,请你将它们改成——允许用户以参数形式从命令行输入; ◎ 范例中客户机发送的是固定文本”Hello Network!”,请改成——允许用户输入字符串,按回车发送;实现循环,直至客户机输入“bye”退出; ◎ 服务器迭代地处理客户机:一个客户机退出后、才接受下一个,按Ctrl+C可以终止服务器程序。(Add error handling code for all socket function calls; In the example, the server address and port are fixed values. Please change them to - allow users to input from the command line in the form of parameters; In the example, the client sends the fixed text "Hello network!", please change it to -- allow the user to input the string and press enter to send; realize the loop until the client enters "Bye" to exit; Server processes clients iteratively: one client exits before accepting the next. Press Ctrl + C to terminate the server program.)
    2020-11-28 22:43:54下载
    积分:1
  • 696516资源总数
  • 106428会员总数
  • 7今日下载