When I turn on the LoginAdapter, the Login control no longer does a successful login.
When the user clicks the LogIn button, a postback takes place, but the user is not authenticated. After the postback there are red asterisks next to the username and password fields, which are now empty.
* I have declared a custom LoginProvider, but *none* of the methods of the LoginProvider are ever called - I set a breakpoint in each function to be sure. When I disable the LoginAdapter, my provider’s ValidateUser
is called normally.
* I listened to all login-related events of the Login control. None are fired.
* I also set a breakpoint on all CLR exceptions. None are thrown.
Can you help me understand better what you mean when you say that you "declared a custom LoginProvider." Do you mean you set up a membership provider in your web.config? That's exactly what the samples in this kit do. They set up something I invented called
the FakeMembershipProvider so the samples could do some simple validation stuff with users and passwords without needing a fancy database, etc. See line 24 of
http://www.asp.net/cssadapters/SrcViewer.aspx?inspect=~/web.config¬ree=true.
Yes, you guessed correctly. I should have said that I set up a membership provider in your web.config. My MembershipProvider works perfectly fine with the Login control if CSSFriendly is turned off. When I turn on CSSFriendly, then I get the problems described
(and apparently no functions of my MembershipProvider are called)
I hadn't noticed that CssAdaptersToturial also uses a custom MembershipProvider. I'll take some time to step through it. I'll let you know what I find (when I get to it!)
Let's work together to try to solve the problem you are experiencing. You say that the Login control doesn't work for you. In order to help, I need a lot more detail. Obviously this adapter kit has a sample of using an adapted Login control and it does
work. So, the first question to address is: how does your situation differ from that sample?
I personally use these adapters on other sites so I know for a fact that they can work in "live" situations, not just samples. Let's try to figure out how your situation is different. Maybe that will tell us what we need to do to change your configuration
or to change the adapter code itself. Remember, the kit comes with full source code so even if we have to modify the adapter we can do so in your site; you have full control over that. But first we need to figure out why your situation isn't working, why
it is different from those situations where things do work.
I have a similar issue. Im using the adapters as well and this happens to me at the createuser method where it adds a user and then does a postback to the createuser page and causes an error that the email address has already been used. Im trying to figure
out what is causing this.
Does this work properly if you do not use the adaptes? You can temporarily "disable" the adapters by simply removing (temporarily) the .browser file found in App_Browsers.
I think i'm having the same problem http://forums.asp.net/thread/1485868.aspx, my "solution" found here http://forums.asp.net/1486503/ShowThread.aspx#1486503 fixed it for my login control, but i'm still having a problem with the recover password control.
esc67: Can you confirm your postbacks are being called twice, can u put a breakpoint on your custom membership and debug it?
BTW: I don't know if it matters but i have VS's sp beta 1...
Can you post markup/code that would allow me to reproduce the problem here? Unfortunately, I need more than the markup for your CreateUserWizard tag. I need a full recipe that would allow me to reproduce the problem without your whole web site, database,
etc. Sorry, I know that's a lot to ask but I can't really get a handle on the problem otherwise.
Have you tried comparing what you are doing against what is being done in the online sample,
http://www.asp.net/CSSAdapters/Membership/CreateUserWizard.aspx? I wonder why it seems to be OK. I'm sure there is a problem but I'm trying to understand why the sample didn't turn
it up.
Hi, I realise that this thread is very old, but it's the closest I've found to the problem I'm experiencing with the CSS Friendly Login adapter.
I have a standard Login control that I converted to a template and added/edited some features. This worked fine and I was able to login as expected. However, when I added the CSS Friendly adapters (latest build), I was suddenly unable to login. The requiredfield
validation events etc still worked, but the login/membership stuff didn't - all I got was a plain page refresh. If I take out the CSS Friendly adapaters the conde works again, so it is definitely something associated with how the login control is amended.
I've looked for a solution but can't find anything. Is this a known issue? Is there a workaround or have I just got to do something else to make things work?
I put a breakpoint on Login1_loggedIn and Login1_LoginError. These are hit when the CSS Friendly adapters are not included in the project, but are not when the adapters are.
My code:
}
I would really welcome any assisitance you can give. This has become really frustrating.
esc67
Member
16 Points
8 Posts
LoginAdapter breaks the log-in
Nov 10, 2006 05:27 AM|LINK
When I turn on the LoginAdapter, the Login control no longer does a successful login.
When the user clicks the LogIn button, a postback takes place, but the user is not authenticated. After the postback there are red asterisks next to the username and password fields, which are now empty.
* I have declared a custom LoginProvider, but *none* of the methods of the LoginProvider are ever called - I set a breakpoint in each function to be sure. When I disable the LoginAdapter, my provider’s ValidateUser is called normally.
* I listened to all login-related events of the Login control. None are fired.
* I also set a breakpoint on all CLR exceptions. None are thrown.
The login control is vanilla:
<%@ Page Language="C#" MasterPageFile="~/Simple.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Login_Default" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphRoblox" Runat="Server"> <asp:Login ID="Login1" runat="server" /> </asp:Content>Here is the rendered page:
"css friendly adapter"
Russ Helfand
Contributor
3304 Points
744 Posts
Re: LoginAdapter breaks the log-in
Nov 10, 2006 09:49 PM|LINK
Can you help me understand better what you mean when you say that you "declared a custom LoginProvider." Do you mean you set up a membership provider in your web.config? That's exactly what the samples in this kit do. They set up something I invented called the FakeMembershipProvider so the samples could do some simple validation stuff with users and passwords without needing a fancy database, etc. See line 24 of http://www.asp.net/cssadapters/SrcViewer.aspx?inspect=~/web.config¬ree=true.
If you want to play around with a local copy of this kit so you can use the debugger, etc., to see how these samples work, see the instructions at http://www.asp.net/cssadapters/walkthru/walkthrough.aspx#RunLocally.
Groovybits.com
esc67
Member
16 Points
8 Posts
Re: LoginAdapter breaks the log-in
Nov 12, 2006 06:49 PM|LINK
Yes, you guessed correctly. I should have said that I set up a membership provider in your web.config. My MembershipProvider works perfectly fine with the Login control if CSSFriendly is turned off. When I turn on CSSFriendly, then I get the problems described (and apparently no functions of my MembershipProvider are called)
I hadn't noticed that CssAdaptersToturial also uses a custom MembershipProvider. I'll take some time to step through it. I'll let you know what I find (when I get to it!)
Thanks for the suggestion,
-Erik
Shazam999
Member
162 Points
34 Posts
Re: LoginAdapter breaks the log-in
Nov 23, 2006 04:31 PM|LINK
Russ Helfand
Contributor
3304 Points
744 Posts
Re: LoginAdapter breaks the log-in
Nov 24, 2006 04:50 PM|LINK
Hi Shazam999,
Let's work together to try to solve the problem you are experiencing. You say that the Login control doesn't work for you. In order to help, I need a lot more detail. Obviously this adapter kit has a sample of using an adapted Login control and it does work. So, the first question to address is: how does your situation differ from that sample?
I personally use these adapters on other sites so I know for a fact that they can work in "live" situations, not just samples. Let's try to figure out how your situation is different. Maybe that will tell us what we need to do to change your configuration or to change the adapter code itself. Remember, the kit comes with full source code so even if we have to modify the adapter we can do so in your site; you have full control over that. But first we need to figure out why your situation isn't working, why it is different from those situations where things do work.
Groovybits.com
skuckreja
0 Points
3 Posts
Re: LoginAdapter breaks the log-in
Dec 12, 2006 03:45 AM|LINK
Russ Helfand
Contributor
3304 Points
744 Posts
Re: LoginAdapter breaks the log-in
Dec 13, 2006 08:07 PM|LINK
Groovybits.com
pnmcosta
Member
145 Points
61 Posts
Re: LoginAdapter breaks the log-in
Dec 15, 2006 12:14 AM|LINK
HI,
I think i'm having the same problem http://forums.asp.net/thread/1485868.aspx, my "solution" found here http://forums.asp.net/1486503/ShowThread.aspx#1486503 fixed it for my login control, but i'm still having a problem with the recover password control.
esc67: Can you confirm your postbacks are being called twice, can u put a breakpoint on your custom membership and debug it?
BTW: I don't know if it matters but i have VS's sp beta 1...
Regards,
Russ Helfand
Contributor
3304 Points
744 Posts
Re: LoginAdapter breaks the log-in
Dec 18, 2006 09:39 PM|LINK
Can you post markup/code that would allow me to reproduce the problem here? Unfortunately, I need more than the markup for your CreateUserWizard tag. I need a full recipe that would allow me to reproduce the problem without your whole web site, database, etc. Sorry, I know that's a lot to ask but I can't really get a handle on the problem otherwise.
Have you tried comparing what you are doing against what is being done in the online sample, http://www.asp.net/CSSAdapters/Membership/CreateUserWizard.aspx? I wonder why it seems to be OK. I'm sure there is a problem but I'm trying to understand why the sample didn't turn it up.
Groovybits.com
iansml
Member
2 Points
1 Post
Re: LoginAdapter breaks the log-in
Jan 20, 2010 04:11 PM|LINK
Hi, I realise that this thread is very old, but it's the closest I've found to the problem I'm experiencing with the CSS Friendly Login adapter.
I have a standard Login control that I converted to a template and added/edited some features. This worked fine and I was able to login as expected. However, when I added the CSS Friendly adapters (latest build), I was suddenly unable to login. The requiredfield validation events etc still worked, but the login/membership stuff didn't - all I got was a plain page refresh. If I take out the CSS Friendly adapaters the conde works again, so it is definitely something associated with how the login control is amended. I've looked for a solution but can't find anything. Is this a known issue? Is there a workaround or have I just got to do something else to make things work?
I put a breakpoint on Login1_loggedIn and Login1_LoginError. These are hit when the CSS Friendly adapters are not included in the project, but are not when the adapters are.
My code:
I would really welcome any assisitance you can give. This has become really frustrating.