Video Conference - ASP.net using SilverLight

Go To StackoverFlow.com

0

I am trying to build a video calling application. It can either be web based or else desktop application. I've managed to produce a web based one using SilverLight, but when hosting the server part on my server (hosted by GoDaddy), the following code :

Listener_Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
Listener_Socket.Bind(new IPEndPoint(AddressAr[0], Port));
Listener_Socket.Listen(-1);

(mainly at .Bind statement) generates the following exception:

Request for the permission of type 'System.Net.SocketPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at WebApplication3.SocketCoderVideoServer.Start_A_Server_On(Int32 Port)

What are my possible solutions? Also, if I am to abandon the following project, what are the best alternatives in which if possible I eliminate the need for the server to listen to new connections?

Please help me cause I need a video conference set up asap ...

Thanks

2012-04-04 23:34
by cgval
"Please help me cause I need a video conference set up asap" - then use something off the shelf... - Mitch Wheat 2012-04-04 23:44
Your website is being hosted in a medium/low/minimal environment, and therefore is blocked from accessing certain parts of the framework via code access security. Quickest solution is to ditch the shared hosting and get a virtual server. That way you can host your own websites and services at full trust. You can get a virtual server for roughly 40 bux a month from many different services - Will 2012-04-05 14:50


1

The hosting is not granting your code the permission to create and use sockets - that makes sense, because GoDaddy would not want hosted code to create and use arbitrary socket connection, it will be a security and performance nightmare.

My suggestion would be to try to use some third-party service already up and running - both Skype and MSN Messanger support video conferencing, can't you leverage that?

I think that instant messaging servers based on the XMPP protocol can suport video as well - see http://xmpp.org/about-xmpp/

2012-04-04 23:44
by MiMo


1

You'll have much better luck if you use Flash and an RTMP server implementation somewhere. I've spent way too much time getting video conferencing working on Silverlight, and it's just not made for it. Unless you're planning to spend the next several years working around the problems, you need to run the code natively, and Flash offers that, and Silverlight doesn't.

2012-04-05 00:08
by Ken Smith
Ads