开发者

Silverlight completed events for WCF calls not firing in Firefox

I've got this problem with completed events not firing for WCF long running calls (up to 1.5 minutes to return), it works ok in IE 8 but doesn't work in Firefox, Chrome or Safari. Looking in Fiddler the results clearly get returned, and as I said, it works ok in IE, so that side of things are obviously working.

Using a sample project, I've managed to narrow it down pretty well, it seems it's due to the fact that I'm using the Client HTTP Stack rather than the browser stack for networking.

Has anyone开发者_StackOverflow had much experience with the client http stack or come across this type of behavior before?

Similar things were happening in IE to start with, but increasing the timeout on the client side for the WCF service, solved that.

Any thoughts or suggestions would be greatly appreciated, as I've done a whole heap of searching around the web, without any luck :(

Cheers, Ola


I ended up reporting this here and it was recognised as a bug in Silverlight 4.

There's not been any resolution to the bug but they've found a workaround, here's the quote from the MS guy who replied to the bug report:

"While trying it out here, I've found that the event handler is invoked, but the e.Error property has a value. That means that you can't access e.Result (since there was an error in the event). If you change the implementation as shown below, you'll see that. However, we're still investigating why the client stack in firefox is behaving differently than the other browser (IE) or the browser stack in Firefox.

void client_DoLongTimeCompleted(object sender, DoLongTimeCompletedEventArgs e)
{
DateTime timeStamp = DateTime.Now;
if (e.Result == null)
{
    txtOutPut.Text += string.Format("\n{0} {1}", e.Result, timeStamp);
}
else
{
    txtOutPut.Text += string.Format("\n[{0}] Error: {1}", timeStamp, e.Error);
}
}"


I have the exact same problem, and reported the issue here: http://forums.silverlight.net/forums/t/221590.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜