Re: forms authentication problem

From: Terry (NTuser_Man@msn.com)
Date: 02/11/03


From: NTuser_Man@msn.com (Terry)
Date: 10 Feb 2003 19:09:09 -0800


After much wailing and gnashing of teeth I found the mistake. It was
not in the .Net code at all. The mistake was in my SQL code.

On the .Net side I used the following to split the UserData into an
array:
","

while in my SQL code I used the following to concatenate the roles:
+ ', ' +

To each value subsequent to the first value I added an empty space.
So when the IsInRole method looked for "Developer" it found only "
Developer".

After removing the empty space the .Net authentication worked exactly
as expected.

--Terry

NTuser_Man@msn.com (Terry) wrote in message news:<55ea4867.0302101249.72402ebe@posting.google.com>...
> Howdy,
>
> I have a forms authentication problem. I am following examples of
> including the user roles in the UserData section of the forms
> authentication ticket. It appears that the user roles are being added
> to the ticket but somehow they are not all being assigned to the user.
> Only one role is assigned to a user.
>



Relevant Pages

  • Re: forms authentication problem
    ... The mistake was in my SQL code. ... > After removing the empty space the .Net authentication worked exactly ... >> authentication ticket. ... It appears that the user roles are being added ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to make a query choose the last three years
    ... My mistake, the order in the between should have the small value first ... It will be OK as long that you place it in square brackets, ... This is my sql after rplace Datewith 2006 after that it worked ... What error did you receive and what was the SQL code you used? ...
    (microsoft.public.access.queries)