|
hello..thanks for the code..its really helpful. I have the folowing issue however, when i create more than one user through the website administration interface, the site goes buzurk..with one user it works fine though. Here is what im doing:
i have a master page with a loginstatus and loginname controls, the login control itself is not on the master page i dont want it to appear everywhere, so its on the default.aspx page. using one user, lets say user1, i can login and logout normally, however if i added another user with the same role, lets say user2, and i login using user1, logging out doesnt work anymore, it keeps me on the same page not going back to default.aspx where the login control resides. Is this issue from the way i wrote the site or is it from integrating mysql with asp membership?
one thing to note is when i press the test button next to the provider it gives me an error that i must create the database, this happens regardless of how many users i created. I am using mysql 4.1. Your help is much appreciated.
Thanks
Mohamed Moubarak
|
|
|
|
|
ok...the logout button doesnt regularly take you back to the page where the login control exists, my mistake..turns out that it was taking me back when i press logout because i have the following in we.config:
<allow users="mam54">
<deny users="*">
but im still facing the problem when creating more than one user...any suggestions?
|
|
|
|
|
|
firstly thanks for this provider... I can use it for add user, login site but ı want to use roles for login same page in my site, But for it ı must create roles and add users in role by use codes. How can ı do it?
thank for your helps
|
|
|
|
|
In case it helps anyone, I've just recently written an article on my blog about implementing ASP.NET Membership using the current version of the MySQL .NET Connector, v5.2.3. That article can be found here.
|
|
|
|
|
Anything for the ASP.net Profile Provider?
- aron
|
|
|
|
|
Hello,
I get a "Could not find any recognizable digits" error when going to the next CreateUserWizard step. Anyone an idea why this happens? I've been cracking my head on it, but no luck...
Regards,
Joep
--
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not find any recognizable digits.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Could not find any recognizable digits.
Source Error:
Line 1536: byte[] returnBytes = new byte[hexString.Length / 2];
Line 1537: for (int i = 0; i < returnBytes.Length; i++)
Line 1538: returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
Line 1539: return returnBytes;
Line 1540: }
Source File: e:\linkedpapers.com\wwwroot\App_Code\MySQLMembershipProvider.cs Line: 1538
Stack Trace:
[FormatException: Could not find any recognizable digits.]
System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos) +0
System.Convert.ToByte(String value, Int32 fromBase) +41
Andri.Web.MySqlMembershipProvider.HexToByte(String hexString) in e:\linkedpapers.com\wwwroot\App_Code\MySQLMembershipProvider.cs:1538
Andri.Web.MySqlMembershipProvider.EncodePassword(String password) in e:\linkedpapers.com\wwwroot\App_Code\MySQLMembershipProvider.cs:1490
Andri.Web.MySqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) in e:\linkedpapers.com\wwwroot\App_Code\MySQLMembershipProvider.cs:453
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
|
|
|
|
|
hi
can someone pls tell me how to add custom fields and provide the updation using andris mysql membership provider
thanks
|
|
|
|
|
Hi
I am having a problem on my login page with this provider. In the loggedIn event of my login control i am trying to get the currently logged in user with this code
Dim u As MembershipUser = Membership.GetUser
but i am getting the error object not set to instance of object
any help much appreciated
thanks
|
|
|
|
|
hi all,
i am using this cs files. work nicely. my last was about navigation error, but that because of tables. now all working fine. Here i am troubling of custom error messages. In change password, i dont want any construction for new messages. but password error or any error occured is shown as "Password incorrect or New Password invalid. New Password length minimum: 7. Non-alphanumeric characters required: 1.". I want to delete the second sentence. how i customize. any possibility
|
|
|
|
|
hi,
i used MySQLProvider and MyRole Provider as well.
All r fine. if any logn problem it Login control show the error.
But after enter the correct username and password, Login Control shows as Logged In but didnt redirect to requested page. The same login page will show. Wat is the problem. any one help me. please
|
|
|
|
|
How change the time of the Cookies Time Expires to 5 days?
All time I get the value: "#12:00:00 AM#"
Example from web.config:
<authentication mode="Forms">
<forms loginurl="login.aspx" name="MYWEBAPP.ASPXAUTH" protection="All" timeout="3000000">
Help...
|
|
|
|
|
Is it possible to use this code for a oracle database. how to create a role provider for connecting to oracle database.
|
|
|
|
|
This article is VERY good; however, MySQL also has an ASP.NET Provider available for download from their site (MySQL Connector/Net 5.2.1).
I've documented my experiences with 5.2.1 (which is alpha at this time) at http://tinyurl.com/28qd33[link]
modified on Saturday, March 8, 2008 1:24 PM
|
|
|
|
|
Using the method on your blog, I see the following error when I go to the ASP.NET Web Site Administration Tool provider tab, click “Select a Different Provider (advanced)” and test the MySQLMembershipProviderprovider:
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
Any thoughts? I can't find any documentation on how to get the MySql Connection/Net Profile Provider anywhere...yours was the closest I found.
What are you coding as the provider type? "MySql.Data, Version=5.2.1.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"?
You say "After the tables are built, you’ll want to setup your web application’s web.config (using your machine.config as a template)"...can you be a bit more specific? Would you mind posting a full blown example?
|
|
|
|
|
I tried the example in this article and got most of the way through but ended up getting connection problems.
I tried the example from your link (to the blog) and it was quicker and easier. After a couple of configuration tweaks I was up and running.
|
|
|
|
|
I've spent days looking, and I keep getting this page! I've tried this code and found the same problems others have listed.
I'm using VWD 2008 Express, MySQL 5.0, and .NET 2.0. I cannot be alone in using this set of tools, yet I can't find one fully-working example of using the built-in membership, roles, personalization, etc. tools with MySQL *anywhere*!
Has anyone got a set of files with instructions that I can use?
Whew!
|
|
|
|
|
I'm using vs2008 and the rest set of tools just like yours... and i managed to get them working properly but ... only on my local host using local MySQL server....
when i try to connect to my testing website using web hosted MySQL server ... the web site administration tool gives me an error when trying to display the security tab... i tried various connection string combinations but still.. no luck.
if someone has a suggestion i would be more then grateful ...
P.S
i used the "Simple.Providers" that I've found here on "the code project" in some other post if I'm not mistaken .
|
|
|
|
|
My provider supports mysql only with odbc: what could I do in this case? I tried to change Mysql objects in Odbc objects, but I can't login... is there a workaround? Please help...
Thank you
|
|
|
|
|
Hi all... I am using this table and control,
1. If the user is giving invalid password it will give one messge as
"Your login attempt was not successful. Please try again."
2. If the attempt for more than 5 times with invalid password the user will be locked... at this time also gives same message as
"Your login attempt was not successful. Please try again."
I need different message to be displayed let me know how to do this,,,
Regards
BalaJi
modified on Monday, January 28, 2008 2:27:42 AM
|
|
|
|
|
Hi,
I have used the work created by Andri (thanks Andri ). But when I uploaded the files to the server I got the following error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'Andri.Web.MySqlRoleProvider'.
Source Error:
Line 92: <add><br />
Line 93: name="MySqlRoleProvider"<br />
Line 94: type="Andri.Web.MySqlRoleProvider"<br />
Line 95: connectionStringName="ConnString"<br />
Line 96: applicationName="Skillconnect"</add>
Source File: C:\Domains\techniel.com\wwwroot\web.config Line: 94
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Any suggestions on how I can resolve it?
Thanks,
-Haniel
|
|
|
|
|
|
I'm having the same problem. Can you clarify which dll to which bin folder please?
Thanks
|
|
|
|
|
Hi
I had this same error (Parser Error Message: Could not load type 'Andri.Web.MySqlRoleProvider') and after 2.5 hrs searching the net I still had no answer.
To make matters worse I had a test project I created a year or so ago using this same code and it worked fine but there seemed to be no differance in the code.
Then I read the instructions again where it says (3. Upload the two files to ~/App_Code)
I realised that what I had done was right clicked on the project and selected 'Add Exsisting Item'.
After clicking Yes to a message asking if I would like to place these classes in a folder called App_Code, VS2005 automaticaly created this folder and placed the classes into it.
Then I got the error.
Now I know this sounds stupid but....
I decided to delete App_Code folder and recreate it manualy.
I then right clicked on this new App_Code folder and selected 'Add Exsisting Item'.
Selected the 2 classes
Ran the project and it worked great!!!
I hope this helps some of you guys.
All the best
Hawkmoth
|
|
|
|
|
On our server we donot have SQLserver or SQLExpress, but when ever I launch the website it is failing to connect to SqlServer.
I donot have any connection strings in the web.config file pointing to SQLserver.
I am using your role and membership provider files to connect to the MYSQL database.
It looks like whenever we launch the website, it tries to create ASPNETDB.MDF in the app_data directory and since we donot have SQLServer it fails to create.
Any help will be appreciated.
|
|
|
|