Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2017
    Posts
    2

    Default Unable to connect by C#.NET sample with VertexFX API

    Hi,

    Sent the correct parameters in method SetLoginInfo, but I am getting the error "Invalid Login".

    I am not able to Connect my C# client with the VertexFX API.l


    Best regards,

    Suntech Business Solution

  2. #2
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    357

    Default

    Dear charusingla

    Quote Originally Posted by charusingla View Post
    Hi,

    Sent the correct parameters in method SetLoginInfo, but I am getting the error "Invalid Login".

    I am not able to Connect my C# client with the VertexFX API.l


    Best regards,

    Suntech Business Solution


    To start working on our client API you have to call login method after setting the correct parameters to SetLoginInfo method.
    After calling these methods(SetLoginInfo and Login ) AllDataAreLoaded event trigger once you logged in successfully otherwise InvalidUsernamePassword event trigger.




  3. #3
    Junior Member
    Join Date
    Nov 2017
    Posts
    2

    Default

    Hi

    Please check my below code:
    private void button1_Click(object sender, EventArgs e)
    {
    CVertexFXBOAPI API = new CVertexFXBOAPI();

    API.SetLoginInfo("Username", "Password", "159.253.137.74", 4401);
    API.Login();
    }

    Error Message : "Invalid Login"

    but My login credentials are correct.

  4. #4
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    792

    Default

    Hello charusingla

    Your code looks fine. but you should wait for some handlers to be triggered after calling the Login method and before calling something else.

    the events are
    1-AllDataAreLoaded which means now the API is ready and you can call any method you want.
    2-InvalidUsernamePassword which means you entered a wrong username and password.

    Code:
    private void button1_Click(object sender, EventArgs e)
    {
        CVertexFXBOAPI API = new CVertexFXBOAPI();
        API.AllDataAreLoaded+= new System.EventHandler(this.APIIsReady);  
        API.InvalidUsernamePassword+= new System.EventHandler(this.InvalidUsernamePasswordAlert);  
        API.SetLoginInfo("Username", "Password", "159.253.137.74", 4401);
        API.Login();
    }
    So you must wait for procedure APIIsReady to be invoked before do any API call.
    If InvalidUsernamePasswordAlert get invoked you must check again the login username and password that you pass earlier to SetLoginInfo method

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. AccessViolationException at API.Login in VB.NET CLIENT API Sample
    By PavelK in forum VertexFX API/VTL Forum
    Replies: 3
    Last Post: 09-02-2017, 06:26 AM
  2. VertexFX LP Bridge API : Sample code not working
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 6
    Last Post: 06-14-2016, 09:09 AM
  3. Unable to connect by VB.NET sample with VertexFX API
    By Alexander Sokhanych in forum VertexFX API/VTL Forum
    Replies: 12
    Last Post: 01-09-2014, 09:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •