Unable to connect webmethods

We are trying the below code to connect the webMethods. first code is connecting with out any issues

        IConnectionFactory connectionFactory = MsgFactory.GetConnectionFactory("Broker #1@10.11.22.33:5555");
        connectionFactory.SSLEncryption = true ;
        IConnection connection = connectionFactory.CreateConnection("SSL Certificate Name");

The below code gives you “No permission for current operation”

        IConnectionFactory connectionFactory = MsgFactory.GetConnectionFactory("Broker #1@10.11.22.33:5555");
        connectionFactory.ClientGroup = "wmJmsSite";
        connectionFactory.SSLEncryption = true ;
        IConnection connection = connectionFactory.CreateConnection("SSL Certificate Name");

Is it related to .Net code or not. It it is permission related where & how to change