wcf+silverlight在部署到IIS上时的步骤
1.web程序中添加wcf服务
2.sl程序中引用该服务 private void button1_Click(object sender, RoutedEventArgs e) { textBox1.Text = ""; Binding binding = new BasicHttpBinding(); EndpointAddress endpoint = new EndpointAddress("http://localhost:29565/ServiceProxy.svc");//WCF服务发布地址 PgmlistService.ServiceProxyClient client = new PgmlistService.ServiceProxyClient(binding, endpoint); client.GetPgmlistsCompleted += new EventHandler<PgmlistService.GetPgmlistsCompletedEventArgs>(client_GetPgmlistsCompleted); client.GetPgmlistsAsync(); }3.在IIS中添加新网站,新网站的绑定端口号与WCF服务发布地址的端口号一致,同时设置默认文档
4.VS2010中 web工程右键, 菜单中的发布
5.打开浏览器地址栏输入 http://localhost:29565/ 成功显示sl客户端