This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Connection via API using gRPC

Hi,

I've got a connection to a cloud-vault that uses gRPC, that works fine via M-Files desktop with the following settings:

Now I want to setup a connection via the API, using the method IMFilesServerApplication.Connect (or any of the overloads: ConnectEx3/ConnectEx4/ConnectEx5ConnectEx6).

I'm using a M-Files login-account for this.

As example I'm trying the following call:

mfServerApplication.ConnectEx6(
AuthType: MFAuthType.MFAuthTypeSpecificMFilesUser
, NetworkAddress: "[instance].cloudvault.m-files.com"
, UserName: "[m-files login account]"
, Password: "[***]"
, ProtocolSequence: "grpc"
, Endpoint: "443"
, EncryptedConnection: true);

This results in the following message:

Network problems are preventing M-Files from communicating with the server.
The RPC server is unavailable.

What is still missing, when building up the connection via API?

Kind regards,

Chris

Parents
  • A colleague tested this in his own development environment and was able to connect to a cloud vault with your settings. Did you try this API connection from the same computer where the desktop client is running? If not, is it possible that there is a firewall or some other component blocking the connection?

Reply
  • A colleague tested this in his own development environment and was able to connect to a cloud vault with your settings. Did you try this API connection from the same computer where the desktop client is running? If not, is it possible that there is a firewall or some other component blocking the connection?

Children
  • Hi Joonas,


    Yes, I've been testing this from the same machine of which I have the client working and also tried by temporary disabling the firewall. 

    I've setup the connection in a separate console/proces, and there I get the connection working! So I've got some direction now where to look and I know it's not in how the grpc-connection is setup. 

    Thanks for answering!

    Kind regards,

    Chris