user5630103
user5630103

Reputation:

Backendless API - Create user

I'm trying to use Backendless API on a C# .net 4.5 application, but there is no way to make it work, since I get

"An unhandled exception of type 'System.StackOverflowException' occurred in weborb.dll."

Code is simple, but doesn't work. The Java sample with Java BE Api worked normally.

  public static void init()
    {
        Backendless.InitApp(APP_ID, SECRET_KEY, VERSION);
    }

    public static void RegisterUser()
    {
        BackendlessUser user = new BackendlessUser();
        string error;
        user.SetProperty("ID", "id");
        user.SetProperty("password","12");

        try
        {
            Backendless.UserService.Register(user); //StackOverflow error here
        }
        catch (BackendlessException exception)
        {
            error = exception.FaultCode;
        }  
    }

Upvotes: 2

Views: 553

Answers (2)

CCondron
CCondron

Reputation: 1974

From the linked sample:

static void Main( string[] args )
    {
      Backendless.InitApp( APP_ID, SECRET_KEY, VERSION_ID );
      BackendlessUser loggedInUser = Backendless.UserService.Login( USER_NAME, PASS_WORD );

      System.Console.WriteLine( "logged in user - " + loggedInUser.Email );
    }

Upvotes: 1

user5630103
user5630103

Reputation:

Backendless team solved this for me, link to the sample in the comments.

Upvotes: 1

Related Questions