Archived

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

Problems with glacier2router and silverlight

Hello,



I have to integrate Glacier2 with IceSL if i test my application in my local host there are no problems, but when I try to change the Glacier2.Client.Endpoints to the internal endpoint
and Glacier2.Client.PublishedEndpoints to the external endpoint
in config.glacier2router and in config.client to the external endpoint of my firewall I obtain the following exception:

[Ice.SocketException] = {Ice.SocketException
error = 0
at IceInternal.ProxyFactory.checkRetryAfterException(LocalException ex, Reference ref, Int32 cnt)
at Ice.ObjectPrxHelperBase.handleException__(LocalException ex, Int32 cnt)
at Ice.ObjectPrxHelperBase.handleExce...

InnerException = {System.Exception: AccessDenied}

i am using ice v 3.3.0 for vs.net 2008

i tested the port forwarding and glacier2 with windows form application
it works and it returns the router and create session fine.

but when i test it with the SL project which i develop or with the one in
the ChatDemo it returns the above exception.

Thank you in advance.
Miro.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Are you running a policy server along with Glacier2 to allow the Silverlight client to connect to Glacier2's port? This is explained in the README.txt file of your Ice for Silverlight distribution.

    Cheers,
    Benoit.
  • Hi ,

    Thank you for your reply.
    Yes i am running policy server and session manager

    below is the contents of config.glacier2router:

    Glacier2.Client.Endpoints=tcp -h privateIP -p 4503
    Glacier2.Client.PublishedEndpoints=tcp -h PublicIP -p 4503
    Glacier2.Server.Endpoints=
    Glacier2.SessionManager=sessionmanager:tcp -h privateIP -p 10002
    Glacier2.PermissionsVerifier=verifier:tcp -h privateIP -p 10002
    Ice.ACM.Client=0
    Glacier2.Client.Buffered=0
    Glacier2.Server.Buffered=0
    Glacier2.Client.ForwardContext=1
    Glacier2.Server.ForwardContext=1
    Glacier2.Client.SleepTime=10
    Glacier2.Server.SleepTime=10
    Glacier2.Client.Trace.Request=1
    Glacier2.Server.Trace.Request=1
    Glacier2.Client.Trace.Override=1
    Glacier2.Server.Trace.Override=1
    Glacier2.Client.Trace.Reject=1
    Glacier2.Trace.Session=1
    Glacier2.Trace.RoutingTable=1
    Ice.Warn.Connections=3
    Ice.Trace.Network=3

    and the client code:

    string IceDefaultRouter = "AMRGlacier2/router:tcp -h PublicIP -p 4503";
    Ice.InitializationData initData = new Ice.InitializationData();
    initData.properties = Ice.Util.createProperties();
    initData.properties.setProperty("Ice.Default.Router",IceDefaultRouter);

    initData.properties.setProperty("Ice.ACM.Client", "0");
    initData.properties.setProperty("Ice.RetryIntervals", "-1");

    communicator = Ice.Util.initialize(initData);

    Ice.RouterPrx defaultRouter = communicator.getDefaultRouter();

    if (defaultRouter == null)
    {

    return 1;
    }
    _router = Glacier2.RouterPrxHelper.checkedCast(defaultRouter);

    if (_router == null)
    {

    return 1;
    }
    Glacier2.SessionPrx s = _router.createSession("","");

    category = _router.getCategoryForClient();


    the policyresponse content:

    <?xml version="1.0" encoding ="utf-8"?>
    <access-policy>
    <cross-domain-access>
    <policy>
    <allow-from>
    <domain uri="*" />
    </allow-from>
    <grant-to>
    <socket-resource port="4502-4506" protocol="tcp" />
    </grant-to>
    </policy>
    </cross-domain-access>
    </access-policy>


    I really appropriate you help.
    Thank you.
    Miro
  • Hi,
    I have solved the the problem and it is now working but another problem appeared:

    i am using iceStorm in the silverlight project and when i call

    topic = manager.retrieve(topicName); function i received the following exeption:

    InnerException = {System.InvalidOperationException: buffer underflow
    at IceInternal.ByteBuffer.checkUnderflow(Int32 size)
    at IceInternal.ByteBuffer.get()
    at IceInternal.BasicStream.readByte()}

    the IceStorm server is running and all are tested locally and working fine.

    Thank you in advance.
  • benoit
    benoit Rennes, France
    Hi,

    Could you post the full stack trace and the code sample of the Silverlight client where this call is made?

    Cheers,
    Benoit.