I have a simple Hello Webservice hosted on localhost like the Silverlight app and this code execute without error (I have checked that MainPage is executed completely though debug) but HelloCompleted is never called.
public Mai开发者_StackOverflow中文版nPage()
{
InitializeComponent();
WebserviceHello.HelloSoapClient Hello = new WebserviceHello.HelloSoapClient();
Hello.getHelloCompleted += new EventHandler<WebserviceHello.getHelloCompletedEventArgs>(HelloCompleted);
}
public void HelloCompleted(object sender,
WebserviceHello.getHelloCompletedEventArgs e)
{
MessageBox.Show("success");
}
So what's going on now ? Is Silverlight unreliable or did I make a mistake ?
Of course the webservice works, I can call it in the webservice test page, and I have called it with winform.
The second line of MainPage instantiates the webservice, the third line binds an eventhandler but you don't call any function from your webservice.
精彩评论