6步教你在Silverlight中使用WCF服务

Silverlight下的WCF服务之三:调用WCF服务从数据库中取出数据显示在datagrid中 <br />本文在Silverlight中调用WCF服务,从sql server数据库中取出customers表格数据,并显示show在silverlight的datagrid控件中。<br /> <br />步骤1:创建StudentService wcf服务。<br /> <br />using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; usin 阅读详情

 

5步教你在Silverlight中使用WCF服务

在Silverlight中如何使用WCF服务呢?本文针对初学者:5步在Silverlight中使用WCF服务

  1. 步骤一:创建WCF服务

 

2.第二步:

在WCF服务中添加跨域策略文件:

lientaccesspolicy.xml

 

crossdomain.xml

 

3.第三步:创建Silverlight项目

 

4.第四步:在刚才创建的Silverlight项目中添加WCF服务的引用

 

5.修改ServiceReferences.ClientConfig文件,如下:

 


6.第六步:在xaml的后台代码中 调用WCF服务 :

 

完成后运行程序,观察结果。



Silverlight与WCF服务集成的数据库访问教程 本文还有配套的精品资源,点击获取 简介:SLWCFDEMO示例代码通过一个Silverlight应用程序展示了如何利用WCF服务访问数据库。这个示例代码适合那些希望提高Silverlight与服务器间数据交互能力的开发者。教程详细介绍了客户端UI创建、WCF服务调用以及RIA服务如何简化数据双向同步。同时,示例代码中可能包括一个数据库备份文件,以供开发者恢复和测试。整体而言... 阅读详情

相关推荐

silverlight通过wcf处理word问题

关于在silverlight使用word的时候遇到的问题,例如无法读取等的解决方案

5步教你在Silverlight中使用WCF服务

5步教你在Silverlight中使用WCF服务

spring的专栏 2849

silverlight+Wcf实现登录

silverlight+Wcf实现登录silverlight+Wcf实现登录

如何在IIS中发布silverlight+WCF项目

说明:在IIS中发布我们的silverlight和wcf开发的web项目,是一件我认为不是很容易的事情,弄了好长时间,才弄好,有些还是不太懂 这里介绍两种方法:分别是发布到本地,和发布到远程服务器 以我们的主机作为服务器,发布到本地,能够成功的条件有以下价格 第一个:必须装.netframework,我用的是4.0版本 第二个:需要启用相应的Inetnet信息服务 第三个:需

脚踏实地 3883

silverlight调用WCF服务的简单例子

此demo是对silverlight调用wcf服务的练习,实现了客户端与服务端进行字符串传递,使用http协议

在IIS上部署Silverlight+WCF项目教程

在IIS上部署Silverlight+WCF项目教程。

Mac自托管通用上下文层:从零搭建AI工作流的统一API

在本地AI工作流和自动化工具链中,上下文信息的分散常常是效率瓶颈。剪贴板内容、前台应用、窗口状态等系统数据各自孤立,难以被上层工具统一调用。为此,自托管通用上下文层成为一种可行方案:它在Mac上充当系统数据源与上层应用之间的中间层,通过统一采集、存储和API接口,将碎片化状态汇聚为可检索的上下文数据。核心设计围绕数据模型、采集策略与查询接口展开,常以FastAPI提供REST API,并以SQLite实现本地持久化,兼顾性能与隐私可控。这种模式的价值在于解耦——上层AI工具、自动化脚本或效率应用只需调用同一

weixin_33842304的博客 365

Silverlight异步调用WCF接口(非常简单易懂)

Silverlight异步调用WCF接口(非常简单易懂)

sliverlight调用wcf服务详解

silverlight中调用wcf服务好好一阵的折腾啊。。。。终于搞定了,做个记录顺便分享一下wcf工程中需要注意的地方:1.新建一个crossdomain.xml文件,内容如下    节点 -->2.修改web.config文件内容  basicHttpBinding" contract="Demo.Wcf.IService1">  basicHttpBinding" con

柳生飘絮 2531

在Termux上安装Kali Linux 完整系统

介绍如何在Termux上安装Kali Linux 完整系统

蓑雨一生的博客 2万+

在昇腾910B上,用kubeadm快速拉起一个双节点K8s集群(保姆级避坑指南)

本文详细介绍了在昇腾910B服务器上使用kubeadm快速搭建双节点Kubernetes集群的完整流程,包括环境准备、容器运行时配置、kubeadm初始化、节点加入与网络插件部署等关键步骤,特别针对ARM架构和昇腾芯片提供了优化配置和避坑指南。

weixin_29204749的博客 252

●创建silverlight+wcf

创建WCF服务应用程序 创建silverlight应用程序 创建其他 WCF服务应用程序中添加WCF服务 引用类库 添加WCF服务 .cs文件中 using System; using System.Collections.Generic; using System.Linq; using System...

weixin_30443747的博客 194

自动驾驶技术路线之争:纯视觉与多模态融合的成本与性能博弈

本文深入剖析了自动驾驶领域两大主流技术路线——纯视觉与多模态融合的本质差异。文章从成本结构、性能博弈与商业逻辑等多维度展开,揭示了纯视觉方案在硬件成本与数据算力投入上的权衡,以及多模态融合方案在安全冗余与感知稳定性方面的优势。这场技术路线之争,实则是车企在性能、成本与商业化落地之间寻求平衡的综合博弈。

weixin_29038303的博客 395

在Silverlight中使用WCF服务之二

在Silverlight中使用WCF服务之二

spring的专栏 1868

AVS3代码阅读HPM4.0

参考AVS3代码阅读(HPM6.0)(一.整体架构以及CU划分部分代码) 版本:HPM4.0 核心文件:app_encoder.c   要做的是帧间预测,所以前面的函数先暂时不管了,挖个坑以后再填。直接从enc_pic看起。 enc_pic()    ...

CRR的博客 3193

Spring 核心技术解析【纯干货版】- I:Spring 基础模块 Spring-Core 模块精讲

Spring-Core 模块,是 Spring 核心容器模块之一。虽然 “Core” 本身就有 “核心的,重要的部分” 的含义,但是它并非是实现(常被我们说为 Spring 核心机制)IOC / AOP 的模块。Spring 中的 IOC 机制,主要来自于 BeanFactory 容器和 ApplicationContext 容器,这二者分别由同为核心容器模块的 Spring-Bean 模块 和 Spring-Context 模块所提供。

栗筝i的博客 2530

Silverlight 访问WCF服务

网络上设置Silverlight动态访问WCF服务,大多是抛开ServiceReferences.ClientConfig文件,完全以代码方式实现对WCF的动态访问。但这种做法存在实现复杂和局限性。在实际使用的过程中,出于安全等原因,很多时候需要通过自定义绑定,设置很多内容。通过 VS中的向导生成Silverlight对WCF的访问,能够自动识别这些内容,并自动生成 ServiceRef...

193

2ED2410-EM的使用

2ED2410-EM的使用

让你爱上电路设计 991

Silverlight连接WCF数据服务的小例子

前段时间,经理让本人开发一个小项目,项目要求需要用到Silverlight开发界面,WCF服务连接数据库,MSSQL作为数据库。由于以前没有接触过WCF,按照微软官方的教程又会出现一些问题,导致一些错误,并且不懂得如何解决。后来,经理给了个小例子,刚开始还不太懂,不过后来慢慢理解了,觉得这个例子还不错,所以向大家分享一下。 本章主要讲到Silverlight应用程序连接WC...

dieying8317的博客 185

如何使用手机编程查看妻子的微信

在本文中,我将向您介绍如何使用编程技巧来查看妻子的微信消息。请注意,隐私是非常重要的,因此在进行此类操作之前,请确保您已经获得了妻子的明确许可。此外,请记住,未经对方授权访问他人的通信是违法行为,因此请谨慎行事。请记住,这仅仅是使用编程技巧来查看妻子的微信消息的一种方法。itchat是一个用于微信个人账号的API,可以通过Python编程语言与微信进行交互。一旦我们登录成功,我们可以使用itchat库获取妻子的微信好友列表。我们可以使用itchat库来查看妻子的微信消息。步骤 5:查看妻子的微信消息。

TechPulseZ的博客 477

Opencv计算机视觉PPT-算法篇

01 02 03 04 05 06 07 08 09 010 011 012 013 014 015 016 017 018

Qt历险记,专注Qt技术,三年医疗设备研发经验,1年机器视觉研发经验,半年柔性传感研发经验。 209

Silverlight与WCF之间的通信(4)silverlight以net.tcp方式调用console上寄宿的wcf服务

转载出处:http://www.cnblogs.com/wengyuli/archive/2010/07/18/1779981.html (由于最近是针对一个demo进行的研究,在之前公开过代码结构,这里只是对需要改动的地方加以说明) WCF4.0使得编写wcf服务不再那么复杂,去掉了许多的配置信息,客户端只需要一个服务地址,便可在系统生成的代理类下做开发了,在部署时也只需

u010158775的专栏 789

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

Silverlight客户端调用WCF服务难题解疑

一:解决办法 Silverlight客户端调用WCF服务在实际使用中经常会出现的问题就是无法直接应用类文件和配置文件。微软针对这一情况已经给出了解决办法。WCF开发框架可以帮助我们实现可靠性较高的跨平台解决方案。对于这样一款功能性较强的工具,我们在实际使用中通常也会遇到一些问题。在这里就来了解一下其中Silverlight客户端调用WCF服务的一些难题解疑。 WCF服务端做好后,可以...

dianpi2993的博客 154

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

如何在ArcGIS Viewer for Silverlight中使用WCF服务完成降雨量专题图显示(一)

在我的工作中遇到有的用户喜欢使用ArcGIS Viewer for Silverlight搭建一些简单的工程,用来作为即将建立的系统的原型系统,或者尝试一些功能,这是一种很方便快捷的方式。但是并不是所有的功能都能够使用Viewer配置完成,有时候扩展开发是必须的。 尤其是有的用户在别的系统中已经有了一系列的数据访问封装好的WCF,只是需要在Viewer中完成数据的调用和显示,那么就更需要对Vie

esricd的专栏 2806

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Silverlight 调用WCF 远程服务器返回了错误: NotFound

Silverlight 调用WCF 远程服务器返回了错误: NotFound。配置处理

greystar的专栏 4134

浅谈Silverlight+WCF

为何要使用WCF   在Silverlight中,网络在某些方面与.NET Framework中的栈相同。可以使用套接字类HttpRequest和WebClient,WCF。但只能用异步方法在网络上首发请求。而其UI线程不应阻塞。而所谓异步调用,就是在主线程进行其他操作的时候,还在进行下载请求,不用等待函数的返回值。在此AJAX就是典型的,不刷新页面调用HttpRequest来进...

denglian4065的博客 241
上一篇: 5步教你在Silverlight中使用WCF服务
下一篇: 在Silverlight中使用WCF服务之二
刘作虎
博客等级 码龄16年 49粉丝 45原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值