RavenDB在使用嵌入式模式调用InvalidOperationException
时抛出。IsOperationAllowedOnDocument
我可以在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.");
除了不使用嵌入式模式之外,还有其他解决方法吗?
谢谢你的时间。