Login ctrl - cookies not accepted?

L

Lubomir

Hi,

I placed a Login control in default.aspx page. I am using Form
authentication and SQL membership provider, OS is Vista 64, browser IE 8.

When I use URI for cookies (cookieless=UseUri) everything works fine. If I
use cookieless=UseCookies, after hitting Login button, user is redirected
back to default page and user is NOT loged on. Browser doesn't show any
rejected cookies, neither settings in browser are set to reject cookies. I
stopped antivirus for testing and it didn't help either.

When user is redirected back to defalt.aspx page, no error message is shown
(message like "Login wasn't successfull ...")

Do you have any idea why it doesn't work or how to troubleshoot it?

Thanks,
Lubomir
 
G

Gregory A. Beamer

I placed a Login control in default.aspx page. I am using Form
authentication and SQL membership provider, OS is Vista 64, browser IE
8.

When I use URI for cookies (cookieless=UseUri) everything works fine.
If I use cookieless=UseCookies, after hitting Login button, user is
redirected back to default page and user is NOT loged on. Browser
doesn't show any rejected cookies, neither settings in browser are set
to reject cookies. I stopped antivirus for testing and it didn't help
either.

When user is redirected back to defalt.aspx page, no error message is
shown (message like "Login wasn't successfull ...")

Do you have any idea why it doesn't work or how to troubleshoot it?

If you are meaning. User hits default.aspx, user logs in, user still
sees login page? Then that is the expected behavior when you make
default.aspx the login page, as an unspecified page hit (no redirect
url) goes to default.aspx. I am not sure why cookieless would help here,
but that is what happens. This is why it is not a good idea to use
default.aspx as the login page. (You actually can get even worse errors
if you are not careful). In fact, if you do not redirect the user in
code, they will be logged in but never know it.

If, instead, you are hitting another page, then being sent to
default.aspx, you are not getting logged in. This could be for any
number of reasons and there is not enough information.

As for "login wasn't successful"? This indicates to me the user IS
logged in, but stuck in a loop because the default.aspx is the login
page.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
L

Lubomir

I have set up the DestinationPageUrl so the Login shoul redirect after login
is successfull.

The firts default page is accessible without authetication, so the login
control could be placed here.

The user is not logged in, I confirmed that with the Ligin Status control.

Thanks,
Lubomir
 
L

Lubomir

In the emantime I solved my problem. I am publishing it here, just in case
enybody else will have the same issue:

Solution:
The domain property for a "forms" element in a web config file had a wrong
value. It caused that authentification cookies were not sent to web site.
Consequently user could not log-in.

/Lubomir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top