views:

93

answers:

2

I am overriding the AuthorizeChangeSet method and return false. The change set is not applied to the data context as expected, but how is the client notiied about this authorization error? The returned SubmitOperation has no error, and I cannot find any information elsewhere inside.

(Still using the Nov 2009 beta with VS2008 and net3.5)

A: 

I'd highly suggest using the version that builds on .net 4.

Essentially what I'd expect to see is an error on the SubmitOperation that you can inspect on your Submit callback. The error should indicate there was an authorization failure.

NikhilK
In the meantime I migrated to VS2010 and the RC-Version but still no luck. The behavior is exactly the same.
Marc Wittke
A: 

Actually, no one cares. With reflector I finally found the place in the framework, where my false is being swallowed: DomainService.AuthorizeChangeSet is called by DomainService.Submit, which is still returning the outcome of DomainService.AuthorizeChangeSet. But see what the ChangeSetProcessor.Process is doing with it:

public static IEnumerable<ChangeSetEntry> Process(DomainService domainService, IEnumerable<ChangeSetEntry> changeSetEntries)
{
    ChangeSet changeSet = CreateChangeSet(changeSetEntries);
    domainService.Submit(changeSet);
    return GetSubmitResults(changeSet);
}

... nothing.

Marc Wittke