Class PermissionDeniedException
An error that indicates the user does not have permission to perform an operation upon a synced Realm. For example, a user may receive this error if they attempt to open a Realm they do not have at least read access to, or write to a Realm they only have read access to.
This error may also occur if a user incorrectly opens a Realm they have read-only permissions to without using the GetInstanceAsync(RealmConfigurationBase, CancellationToken) API. A Realm that suffers a permission denied error is, by default, flagged so that its local copy will be deleted the next time the application starts.
The PermissionDeniedException exposes a method that
can be called with a single argument: true
to immediately delete the Realm file,
or false
to not delete the file at all (either now or upon restart). This method
should only be called with true
if and when your app disposes of every
instance of the offending Realm on all threads.
Implements
Inherited Members
Namespace: Realms.Sync.Exceptions
Assembly: Realm.dll
Syntax
public class PermissionDeniedException : SessionException, ISerializable
Methods
| Improve this Doc View SourceDeleteRealmUserInfo()
A method that can be called to manually initiate or cancel the Realm file deletion process. If the method isn't called at all, the Realm file will be deleted the next time your application is launched and the sync subsystem is initialized. Can only be called once.
Declaration
public bool DeleteRealmUserInfo()
Returns
Type | Description |
---|---|
Boolean |
|