C#, ASP.NET, VS2005, SQL Server 2005 Developer
I've used aspnet_regsql to install the membership/role tables into my
I have confirmed that all the tables are there.
I've also configured the web.config to specify the new database as the
role provider and the membership provider. I have used the "ASP.NET
Configuration" tool to manage users and roles. These are definately
saved to the database mentioned above. All this works great.
I have added a WebControls.Login control to the form and, by default,
the username/password is not accepted (even though the custom
membership provider is specified as default in the web.config). I
changed the property of "MembershipProvider" for the control and
specified my custom membership provider. Still no love.
To trouble shoot, I handled the "LoginError" event of the Login control
and discovered that it doesn't think the username exists which makes me
think its still not talking to the correct database. I DO have SQL
Express installed on the same machine, along with SQL Server 2000 as
Here's my web.config entries for my providers:
<roleManager enabled="true" defaultProvider="CustomizedRoleProvider">
Any help is appreciated!
The user that got created was being inserted with an "Application" name
of "\myapp" however by default, the web config entry for the membership
provider assumes an application name of "\" so it was querying the
database asking for a user of "steven" in the "\" app instead of the
"\myapp". Even though when I went to the ASP.NET Web configuration, I
clicked the radio that specifies one membership profile per application
(instead of one for ALL applications), it still set up the tables as
though it was going to be reused across multiple applications.
So the actual fix was an entry in the web config for the member
provider, specifying the application name, here's an example:
Hope this helps future readers. Don't reply to this if it did, just
send me money.