Create Bookmark, NotAllowedInThisState

Hello,

I am using Visual studio 2022, .Net Framework 4.8.

and “MilestoneSystems.VideoOS.Mobile.SDK” version 23.2.1 SDK.

I am getting “NotAllowedInThisState” error when try “Create Bookmark”.

I tried Bookmark with Smart Client 32 bit, it is working.

Create bookmark code:

private void tsmiBookmark_Click(object sender, EventArgs e)
 
    {
 
      var bookmarkParams = new BookmarkParams()
 
      {
 
        VideoId = _liveVideo.StreamId,         
 
        Name = "Test Bookmark",
 
        Description = "none",
 
        Time = DateTime.Now.ToUniversalTime(),
 
        //StartTime = DateTime.Now.ToUniversalTime(),         
 
        CameraId = _liveVideo.StreamParams.CameraId
 
      };
 
 
 
      Console.WriteLine($"Video Id: {_liveVideo.StreamId}");
 
      Console.WriteLine($"Camera Id: {bookmarkParams.CameraId}");
 
      var response = Connection.Bookmarks.CreateBookmark(bookmarkParams, _timeout);
 
            
 
 
 
      Clipboard.SetText(bookmarkParams.VideoId.ToString());
 
      Debug.WriteLine($"Video Id copied to clipborard: {bookmarkParams.VideoId.ToString()}");
 
      Debug.WriteLine("--------------------------------------");
 
 
 
      if (response.Result == Command.CommandResultTypes.ResultOk)
 
      {
 
        Console.WriteLine($@"Bookmark success: {response.Result}");
 
      }
 
      else
 
      {
 
        Console.WriteLine($@"Bookmark failed: {response.Result} ->{response.CommandResult}-> {response.ErrorCode}-> {response.ErrorMessage}");
 
      }       
 
    }

My Full source code:

I am using LiveSample project in this solution

https://drive.google.com/file/d/1s0FiTsQoqTWs2NQJAY1WQwKQxiGm_3mH/view

My screen record:

https://drive.google.com/file/d/1GrehEb0RUuXDoEeSDZeIIUzHELa3Uhka/view

Thanks in advance

Hi @Taner Özgündüz

I was able to run your sample without any problem against the latest version of the product. Bookmark is successfully created.

image.pngOn the video I notice you’re using version XProtect Proffessional+ 2020 R3.

Be aware that Mobile SDK is only compatible with the same version of the product.

Therefore, to use MilestoneSystems.VideoOS.Mobile.SDK version 23.2.1, your Mobile Server has to be 2023 R2.

Also, Mobile Server 2023R2 officially supports Corporate/Proffessional versions after 2021R1, so you may need to upgrade everything, to be able to use the latest SDK.

Hi @Nikolay Dimitrov

Thank you for your answer

Best Regards