Consuming web service from web player

Unity forum contains an opinion "You can, however, deploy a .NET DLL with a webplayer project as well as a standalone. You should be able to just add System.Web.Services.dll from mono to your project."

I did that, It doesn't work. It just throws an exception:

System.MissingMethodException: Method not found: 'System.Security.Cryptography.X509Certificates.X509CertificateCollection.AddRange'. at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest (System.Uri uri) [0x00000] in :0 at System.Web.Services.Protocols.SoapHttpClientProtocol.GetRequestForMessage (System.Uri uri, System.Web.Services.Protocols.SoapClientMessage message) [0x00000] in :0 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String method_name, System.Object[] parameters) [0x00000] in :0 (my methods below)

The problem is system.dll from the "unity_web" folder lacks the "System.Security.Cryptography.X509Certificates.X509CertificateCollection.AddRange" method.

System.dll from the "unity" folder has this method, that's why I suppose desktop unity applications can consume web services OK.

What's the solution?

I can't believe I'm the only person trying to consume a web service from Unity web player.

Thanks in advance!

Not sure if this is of any help, but I was running into similar problems trying to consume a web service from Unity’s web player. I posted a solution I found on this forum here

Hope its of use to you. I didn’t find that Unity consumed SOAP in a web service due to security limitations - but it does in a Windows/Mac build. However if you are just using json or GET/POST to return string values - it is possible to get some communication with a web service.