开发者

The webservice handler is never called I have no compilation error no security exception

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜