Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using WCF service in WebGL

Discussion in 'Scripting' started by martyfoxy, Jun 14, 2018.

  1. martyfoxy

    martyfoxy

    Joined:
    Jul 24, 2017
    Posts:
    4
    Hello!

    Project at my work uses WCF service for network stuff like authentication or getting data. I need to make a WebGL app which can consume WCF service.
    Using this tutorial I made a simple service. It works fine on PC but I got error while testing on WebGL:
    NotSupportedException: C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System.Reflection.Emit\AssemblyBuilder.cpp(20) : Unsupported internal call for IL2CPP:AssemblyBuilder::basic_init - System.Reflection.Emit is not supported.

    I tried to solve this problem. Somebody said it works (at least on iOS) if wsdl is used instead of svcutil. But then I've got another error on startup
    MissingMethodException: No constructor found for System.Web.Services.Protocols.SoapTypeStubInfo::.ctor(System.Web.Services.Protocols.LogicalTypeInfo) at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 


    Is there any other possible decisions to use WCF in WebGL?