I am Trying to use the accesschek method for authentication in the azman but i always get this error message "Value does not fall within the expected range."

Here is my code

Anyone can help me?

I am running this application in windows xp

AzAuthorizationStore store = new AzAuthorizationStoreClass();
store.Initialize(0, @"msxml://c:\teste\sspm.xml", null);
IAzApplication app = store.OpenApplication("SPMM", null);

string teste = store.Description;

System.Security.Principal.WindowsIdentity identity = System.Security.Principal.WindowsIdentity.GetCurrent();

IAzClientContext ctx = app.InitializeClientContextFromToken((ulong)identity.Token, null);

string name = Resource1.TarefaConfigurarPraca.ToString();

object results = new object[1];
Object[] operation = new Object[1];
Object[] scope = new Object[1];
scope[0] = "GENERAL";
Object[] names = new Object[1];
Object[] values = new Object[1];
operation[0] = Resource1.TarefaConfigurarPracaId.ToString();

names[0] = "";
values[0] = "";


results = ctx.AccessCheck("teste", scope, operation, null, null, null, null, null);


object[] returnResults = (object[])results;

if (returnResults[0].ToString() == "0")
{

return true;

}

else
{

return false;

}

I am facing the same problem, Have you got any solution to this??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.