Archived

This forum has been archived. Please start a new discussion on GitHub.

SilverLight client complains Ice.UnknownUserException

Hi all,

I have a SilverLight client talking to server in ICE language, the issue is that when operation at server side throws an user defined exception, the client only get an Ice.UnknownUserException instead of that user defined exception.

Before I post here, I have already digged the Zeroc manual, the manual says that this exception is raised if the operation lacks throws clause, but this is obviously not the case, 1) the clause is added explicitly and 2) I got a JAVA client trying to simulate the same scenario and exception can be caught as expected;

So now I am completely confused, but I got strong sense that shit may happen at client side, otherwise my JAVA client would fail as well.

So please, if anybody knows or has experienced the same issue, pleast let me know.

Thanks a lot in advance.
Ben

Comments

  • mes
    mes California
    Hi,

    The Ice for Silverlight run time needs some help finding the generated code for Slice classes and exceptions. See this discussion in the manual for more information. Let us know if you're still having trouble.

    Regards,
    Mark
  • mes wrote: »
    Hi,

    The Ice for Silverlight run time needs some help finding the generated code for Slice classes and exceptions. See this discussion in the manual for more information. Let us know if you're still having trouble.

    Regards,
    Mark

    Many thanks to your quick reply, after digging into that discussion, I tried the solution suggested as follows:

    [PHP]init.properties.setProperty("Ice.FactoryAssemblies", "IndicatorServiceSLDemo")[/PHP]

    in which "IndicatorServiceSLDemo" is the assembly generated together with the slice generate code. (IndicatorServiceSLDemo.dll has also been tried), anyway, it turns out be exactly the same issue.

    Here is the error message:

    From getIndicatorGrpDefineIce.UnknownUserException
    unknown = "com::boco::scenemonitor::generated::modelBase::ServiceException"
    位于 com.boco.scenemonitor.generated.indservice.svc.IIndicatorServicePrxHelper.end_getIndicatorGrpDefine(AsyncResult r__)
    位于 com.boco.scenemonitor.generated.indservice.svc.IIndicatorServicePrxHelper.getIndicatorGrpDefine_completed__(AsyncResult r__, Callback_IIndicatorServiceBase_getIndicatorGrpDefine cb__, ExceptionCallback excb__)

    Hope this can help spot the problem.

    Thanks,
    Ben
  • benoit
    benoit Rennes, France
    Hi,

    Did you try to specify the fully qualified name for the assembly? For example:
    init.properties.setProperty("Ice.FactoryAssemblies", "IndicatorServiceSLDemo,Version=1.0.0.0,Culture=neutral,PublicKeyToken=b17a5c561934e089");
    

    Version and PublicKeyToken need to be replaced with the correct values for your assembly. Make sure to not specify any spaces in the fully qualified name of the assembly.

    If this doesn't work, you could also try to directly link the generated code with your Silverlight application. If this still doesn't work, I would recommend to try to reproduce with a simple test case, for example you could try to modify the Silverlight hello client and Ice for C# hello server to throw a user a exception and see if this works.

    Cheers,
    Benoit.
  • Thanks Benoit and Mark

    Ice.FactoryAssemblies works, the reason why it didn't work is my own mistake.

    Thanks so much!

    Ben