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