Silverlight chat application using WCF full duplex
Last week I have been started to read about full duplex wcf and his implementation in silverlight applications.I have read tons of articles on MSDN and tons of blog and forum posts.
Recently I have found solution for chat application on this blog http://silverbling.blogspot.com/2009/01/using-pollingduplexhttpbinding-for.html
so I have little modified that application but it is basically same application.This application is based on this blog post of Dan Wahlin :
Everything that you need to know about building wcf full duplex application for silverlight you can find on msdn :
http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx
and for accessing wcf duplex from silverlight client:
http://msdn.microsoft.com/en-us/library/cc645028(VS.95).aspx
This application is also based on same articles above.This is simple chat application that has no chat rooms.Same concept you can use for developing multiplayer online silverlight games.
If you want to modify this application to add rooms you can look some useful pattern for that List-Based Publish-Subscribe :
http://msdn.microsoft.com/en-us/library/ms752254.aspx
What I have get when I have finished project looks like this :
Only thing that you need to do to make this project work for you is to change url of your wcf web service in page.xaml.cs .
this.pusher = new PushDataReceiver(
this.processor,
“http://localhost.:5433/SilverlightChatDuplexService.svc”,
“Silverlight/ISilverlightChatDuplexService/InitiateDuplex”, // The Wcf function or action.
“”);
Todd morrison
February 23, 2009 at 12:16 am (16 years ago)Yeah, this is pretty much how we are doing collaboration.
Now, wouldn’t it be cool if someone setup a peer-to-peer resource framework using duplex?!
Radenko Zec
February 23, 2009 at 8:53 am (16 years ago)Todd.That is only matter of time 🙂
Patrick
August 2, 2009 at 8:59 am (15 years ago)I’m using VS 2008, and I’m having a problem with the svc file. I’m currently receiving the following error: “Metadata publishing for this service is currently disabled.” I tried editing the web.config file following the instructions on this page…
http://msdn.microsoft.com/en-us/library/ms734765.aspx
…but had no luck.
Any ideas would be most appreciated.
Radenko Zec
August 4, 2009 at 3:52 am (15 years ago)Patrick. You are on the right way. You need to modify web config to enable metadata publishing for WCF service.
You have all information on that site. Read it again.
Anil Pandey
August 6, 2009 at 12:57 am (15 years ago)hi,
i check this application that is very nice, but while running the application i m getting the Soap error that Soap 11 and soap 12 mismatch.
once i resolve that i m getting the error that the Remote server returned an error NOT FOUND.
can you please help me out in solving this error.
Thanks
Anil Pandey
Radenko Zec
August 6, 2009 at 5:42 am (15 years ago)Hi Anil.You have maybe changed web config file on server and put some error code in it. For example incorrect binding name…
First check your WCF server config file and check your service is up and running.
Zain Shaikh
October 3, 2009 at 10:04 pm (15 years ago)really good effort, thanks for providing the source code.