Windows phone 7 如何从windows phone向web服务传递e.channel Uri
在上面的代码中,ServiceReference1是我的Web服务,现在我想向Web服务发送e.channelURI。如何将此uri传递给web服务?如果我猜正确,您的web服务中还有一个类似“InsertNotificationURL”的方法,它需要一个字符串。最后,我完成了该操作。首先,我们必须为我们的服务创建对象,如下所示。Service.Service1Client对象=新Service.Service1Client;接下来,我们将把URI作为Object.InsertNotificationUrlAsyncstring.Format.channeluri.ToString传递给web服务;Windows phone 7 如何从windows phone向web服务传递e.channel Uri,windows-phone-7,windows-phone-8,windows-phone-7.1,Windows Phone 7,Windows Phone 8,Windows Phone 7.1,在上面的代码中,ServiceReference1是我的Web服务,现在我想向Web服务发送e.channelURI。如何将此uri传递给web服务?如果我猜正确,您的web服务中还有一个类似“InsertNotificationURL”的方法,它需要一个字符串。最后,我完成了该操作。首先,我们必须为我们的服务创建对象,如下所示。Service.Service1Client对象=新Service.Service1Client;接下来,我们将把URI作为Object.InsertNotificat
void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
Dispatcher.BeginInvoke(() =>
{
// Display the new URI for testing purposes. Normally, the URI would be passed back to your web service at this point.
System.Diagnostics.Debug.WriteLine(e.ChannelUri.ToString());
//MessageBox.Show(String.Format("Channel Uri is {0}",
// e.ChannelUri.ToString()));
ServiceReference1.Service1Client objServiceClient = new ServiceReference1.Service1Client();
objServiceClient.InsertNotificationURLCompleted +=
new EventHandler<InsertNotificationURLCompletedEventArgs>(
});
}