鉴于以下代码我将如何在代码中更改/设置我的Silverlight WCF服务URI?

时间:2010-03-25 18:54:07

标签: wcf silverlight dynamic uri

鉴于以下代码我将如何在代码中更改/设置我的Silverlight WCF服务URI?

    mySvc.InsertPOCompleted += new EventHandler<SalesSimplicityPO_SL.POSvc.InsertPOCompletedEventArgs>(mySvc_InsertPOCompleted);
    mySvc.InsertPOAsync(InitialsTextBox.Text.ToString(), DescTextBox.Text.ToString(), ClientTextBox.Text.ToString());

1 个答案:

答案 0 :(得分:0)

BasicHttpBinding binding = new BasicHttpBinding(); 
EndpointAddress address = new EndpointAddress(new Uri("http://localhost/POSystem/POSvc.svc")); 
POSvc.POSvcClient mySvc = new POSvc.POSvcClient(binding, address);