| Author |
Message |
gg
Guest
|
Posted:
Sat Nov 05, 2005 5:50 pm Post subject:
Authentication and Guest user |
|
|
Hi,
i'm trying to make a custom authentication form for my mcms site.
User put is username and pass and after a check against the db i put
this code:
bool setAspNetCookie = true;
bool persist = false;
CmsAuthenticationTicket ticket
=CmsFormsAuthentication.AuthenticateAsUser(ConfigurationSettings.AppSettings["EuromotoLDAPAdminMCMSUser"],
ConfigurationSettings.AppSettings["EuromotoLDAPAdminMCMSPass"]);
CmsFormsAuthentication.SetAuthCookie(ticket,setAspNetCookie,persist);
then i redirect the user to a page that contains only the default
console.
The problem is that i cant see the console cause the "Allow Guests On
Site" option in SCA is enabled.
I also disabled windows authentication in IIS (i run win 2003), cause i
dont want the username/password prompt when the user browse the
homepage.
What can i do to see the console ? |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Mon Nov 07, 2005 5:50 pm Post subject:
Re: Authentication and Guest user |
|
|
Hi gg,
I cannot see the redirect from login page in your code.
Did you post the complete code?
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"gg" <gigino@gmail.com> wrote in message
news:1131206329.590498.64060@g14g2000cwa.googlegroups.com...
| Quote: | Hi,
i'm trying to make a custom authentication form for my mcms site.
User put is username and pass and after a check against the db i put
this code:
bool setAspNetCookie = true;
bool persist = false;
CmsAuthenticationTicket ticket
=CmsFormsAuthentication.AuthenticateAsUser(ConfigurationSettings.AppSettings["EuromotoLDAPAdminMCMSUser"],
ConfigurationSettings.AppSettings["EuromotoLDAPAdminMCMSPass"]);
CmsFormsAuthentication.SetAuthCookie(ticket,setAspNetCookie,persist);
then i redirect the user to a page that contains only the default
console.
The problem is that i cant see the console cause the "Allow Guests On
Site" option in SCA is enabled.
I also disabled windows authentication in IIS (i run win 2003), cause i
dont want the username/password prompt when the user browse the
homepage.
What can i do to see the console ?
|
|
|
| Back to top |
|
 |
gg
Guest
|
Posted:
Tue Nov 08, 2005 9:51 am Post subject:
Re: Authentication and Guest user |
|
|
The redirect is Response.Redirect(MySite/AdminChannell/AdminPost).
The problem is that i reach that admin post, but i can't see the
console due to the guest account. |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Tue Nov 08, 2005 1:50 pm Post subject:
Re: Authentication and Guest user |
|
|
Hi gg,
the reason is not the guest account.
If a correct cookie would have been set the user identified with the cookie
would be used.
If guest account is enabled you will get the token for the guest user in
case the given credentials are incorrect.
So I would assume that the credentials are wrong or in a wrong format.
Did you pass them as "WinNT://domain/user"? Other formats are not supported.
Please disable guest account and check if the token you get in your login is
a valid token.
Also verify if you did configure forms authentication in web.config.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"gg" <gigino@gmail.com> wrote in message
news:1131439512.675814.125640@z14g2000cwz.googlegroups.com...
| Quote: | The redirect is Response.Redirect(MySite/AdminChannell/AdminPost).
The problem is that i reach that admin post, but i can't see the
console due to the guest account.
|
|
|
| Back to top |
|
 |
|
|
|
|