2

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;
        }  
    }
  • Just wondering, did you get to solve this problem? Do you have any documentation for me on how to use the API? – NoChance Jan 25 '16 at 02:30
  • 1
    Oh, I have solved this using the sample provided by the Backendless staff, here it is: https://www.dropbox.com/s/4ggxd6w3o6risqt/UserLoginSample.zip?dl=1 –  Jan 25 '16 at 12:50

2 Answers2

1

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

  • 1
    Could you edit your answer to include the relevant code that solved your problem? The link in the comments is to a .zip file on DropBox...which presumably isn't going to be available in the near future. – Richard Ev Jan 25 '16 at 14:20
1

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 );
    }
CCondron
  • 1,926
  • 17
  • 27