当使用嵌入式模式调用IsOperationAllowedOnDocument
时,RavenDB会抛出InvalidOperationException
异常。
我可以看到在IsOperationAllowedOnDocument
实现中有一个子句检查是否在嵌入式模式下调用。
namespace Raven.Client.Authorization
{
public static class AuthorizationClientExtensions
{
public static OperationAllowedResult[] IsOperationAllowedOnDocument(this ISyncAdvancedSessionOperation session, string userId, string operation, params string[] documentIds)
{
var serverClient = session.DatabaseCommands as ServerClient;
if (serverClient == null)
throw new InvalidOperationException("Cannot get whatever operation is allowed on document in embedded mode.");
有没有其他方法可以解决这个问题,除了不使用嵌入模式?
感谢您的时间。