asp.net - Roles.IsUserInRole throwing a dataservicequeryexception -


what i'm trying test if role affected user or not, method (fig 1 ) test exposed wcf data service, , i'm trying call (fig 2 ) client side. call correct because tested simple test returns , got want send when change body of method send me wheter user in role or not, thows exception ( dataservicequeryexception )

fig1:

    [webget]     public bool controler(string role, string user)     {         if(roles.isuserinrole(user,role))         { return true; }              return false;      } 

fig2:

      uri u = new uri(string.format(login.ctx.baseuri + "/controler?role='{0}'&user='{1}'",         "serveur","oussama"), urikind.relativeorabsolute);          ienumerable<bool> result = login.ctx.execute<bool>(u);         bool res = result.single();          if (res == true)         {             response.redirect("index.aspx");         }          else         {             response.redirect("error.aspx");         } 

thanks !


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -