vs2010+Silverlight4+WCF开发部署全过程(转)
2011-11-05 18:04
141 查看
1 安装开发环境 操作系统:Windows 7 专业版 微软先锋计划199元购 Vs2010:cn_visual_studio_2010_ultimate_x86_dvd_532347.iso这是微软送的一个版本,先前在微软下载的。 银光套件:Silverlight.exe Silverlight4_Tools.exe Silverlight_Developer.exe 2 安装 依次安装
1 安装开发环境
操作系统:Windows 7 专业版 微软先锋计划199元购
Vs2010:cn_visual_studio_2010_ultimate_x86_dvd_532347.iso这是微软送的一个版本,先前在微软下载的。
银光套件:Silverlight.exe
Silverlight4_Tools.exe
Silverlight_Developer.exe
2 安装
依次安装:vs2010,完全安装
Silverlight.exe
Silverlight4_Tools.exe
Silverlight_Developer.exe,按微软说的只要安装了Silverlight4_Tools.exe,就不用安装Silverlight_Developer.exe,但是在调试程序还是要我安装Silverlight_Developer,我就有安装了它。
3 建立一个vs2010+silverlight4+wcf的项目
为了少啰嗦,大家看图吧。
silverlight项目中的脚本 XML code UserControl x:Class=SilverlightApplication1.MainPage xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/x
silverlight项目中的脚本
XML code
UserControl x:Class="SilverlightApplication1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"><StackPanel ><TextBlock x:Name="text_result" Text="显示结果"></TextBlock><Button x:Name="button_get_welcome" Content="测试wcf" Width="100" Click="button_get_welcome_Click"></Button></StackPanel></Grid></UserControl>
后台代码:
VB.NET code
PartialPublicClass MainPage Inherits UserControl Private wcf AsNew ServiceReference1.Service1Client PrivateSub wcf_get_wcf_welcomeCompleted(ByVal s AsObject, _ ByVal e As ServiceReference1.get_wcf_welcomeCompletedEventArgs) text_result.Text = e.Result End SubPublicSubNew() InitializeComponent() AddHandler wcf.get_wcf_welcomeCompleted, AddressOf wcf_get_wcf_welcomeCompleted End SubPrivateSub button_get_welcome_Click(ByVal sender As System.Object, _ ByVal e As System.Windows.RoutedEventArgs) wcf.get_wcf_welcomeAsync() End SubEnd Class
wcf中添加的一段代码:
VB.NET code
<OperationContract()>PublicFunction get_wcf_welcome() AsStringReturn"欢迎连接wcf成功。"End Function
这是一个部署和使用成功的项目,不好意思是vb代码,不过不影响整个过过程。
第20-22张图注释:
在项目文件下有一个SetupMySilverlight4文件夹
第23-24张图注释:
要想正确执行:SetupMySilverlight4\debug\setup.exe,必须做的一个设置。不知道微软为什么要让用户这样做,而没有设成默认值。
安装后,在浏览器上的执行地址是:
http://192.168.1.x/SetupMySilverlight4/SilverlightApplication1TestPage.aspx
转自:http://www.silverlightchina.net/html/tips/2011/0418/7002.html
1 安装开发环境
操作系统:Windows 7 专业版 微软先锋计划199元购
Vs2010:cn_visual_studio_2010_ultimate_x86_dvd_532347.iso这是微软送的一个版本,先前在微软下载的。
银光套件:Silverlight.exe
Silverlight4_Tools.exe
Silverlight_Developer.exe
2 安装
依次安装:vs2010,完全安装
Silverlight.exe
Silverlight4_Tools.exe
Silverlight_Developer.exe,按微软说的只要安装了Silverlight4_Tools.exe,就不用安装Silverlight_Developer.exe,但是在调试程序还是要我安装Silverlight_Developer,我就有安装了它。
3 建立一个vs2010+silverlight4+wcf的项目
为了少啰嗦,大家看图吧。
silverlight项目中的脚本 XML code UserControl x:Class=SilverlightApplication1.MainPage xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/x
silverlight项目中的脚本
XML code
UserControl x:Class="SilverlightApplication1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"><StackPanel ><TextBlock x:Name="text_result" Text="显示结果"></TextBlock><Button x:Name="button_get_welcome" Content="测试wcf" Width="100" Click="button_get_welcome_Click"></Button></StackPanel></Grid></UserControl>
后台代码:
VB.NET code
PartialPublicClass MainPage Inherits UserControl Private wcf AsNew ServiceReference1.Service1Client PrivateSub wcf_get_wcf_welcomeCompleted(ByVal s AsObject, _ ByVal e As ServiceReference1.get_wcf_welcomeCompletedEventArgs) text_result.Text = e.Result End SubPublicSubNew() InitializeComponent() AddHandler wcf.get_wcf_welcomeCompleted, AddressOf wcf_get_wcf_welcomeCompleted End SubPrivateSub button_get_welcome_Click(ByVal sender As System.Object, _ ByVal e As System.Windows.RoutedEventArgs) wcf.get_wcf_welcomeAsync() End SubEnd Class
wcf中添加的一段代码:
VB.NET code
<OperationContract()>PublicFunction get_wcf_welcome() AsStringReturn"欢迎连接wcf成功。"End Function
这是一个部署和使用成功的项目,不好意思是vb代码,不过不影响整个过过程。
第20-22张图注释:
在项目文件下有一个SetupMySilverlight4文件夹
第23-24张图注释:
要想正确执行:SetupMySilverlight4\debug\setup.exe,必须做的一个设置。不知道微软为什么要让用户这样做,而没有设成默认值。
安装后,在浏览器上的执行地址是:
http://192.168.1.x/SetupMySilverlight4/SilverlightApplication1TestPage.aspx
转自:http://www.silverlightchina.net/html/tips/2011/0418/7002.html
相关文章推荐
- 开发部署带有自定义用户控件的WebPart全过程
- java web开发--Servlet学习之HelloWorld 从部署到开发全过程
- 开发过程使用Tomcat Maven插件持续快捷部署Web项目
- VS2010+Silverlight4+wcf开发部署全过程
- 开发过程使用Tomcat Maven插件持续快捷部署Web项目
- vs2010+Silverlight4+wcf开发部署全过程
- SpringMVC之旅-开发到部署过程中遇到的问题整理(不断更新)
- 在Eclipse开发Webapp部署过程中,缓存的位置设置
- 【Sharepoint】WebPart开发、部署、发布过程全记录
- sharepoint 开发及部署过程中遇到的问题 bySange
- 用Activex控件(cab)自动部署软件:Activex开发和发布过程与总结。
- java web开发--------Servlet学习之HelloWorld 从部署到开发全过程
- Eclipse开发环境下,部署和配置svn的整个过程
- 在Eclipse开发Webapp部署过程中,缓存的位置设置
- spring-boot 热部署 intellij IDE(开发过程)
- Eclipse开发环境下,部署和配置svn的整个过程
- 借助命令行工具自动化Webpart的部署过程(使用VS.NET2003开发)
- 开发过程使用Tomcat Maven插件持续快捷部署Web项目
- codenameone 的开发及部署过程简述