|
You can find example paghes on the new code in the article here[^]
--
http://katro.net
|
|
|
|
|
Has anyone experienced this problem using this membership provider for Mysql
Error is
error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
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: MySql.Data.MySqlClient.MySqlException: error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
I've got it running under an ASP.NET/VB.NET website with compiling as suggested ,but do get this error whenattempting to login into the website.
Once in all seems OK
error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
The error points to line 1282 in MySQLMembershipProvider.cs
Line 1280: else
Line 1281: {
Line 1282: throw e;
Line 1283: }
Line 1284: }
Thanks
|
|
|
|
|
This a problem in the mysql connector. Try to download the latest connectors from mysql.com
Note :
New version of this article[^]
This is the last day I am replying to comments on this page.
|
|
|
|
|
I implemented this Membership and Role provider, as well as the MySQL Profile provider found here on a test site I'm working on. So far I can create users, delete users, and login the users via the login control, BUT once I click the Login button, I just get the login control again. The system shows the user as logged in, but the page controls do not.
Anyone have any idea what might be doing this?
|
|
|
|
|
In Enterprise Lib, the Quickstart has a security example for win form. How can I apply your attribution for win form ????
Please help me. Thanks.
|
|
|
|
|
How do i make so the "Is this user online" is showed for
MembershipUser memUser = Membership.GetUser()
It always shows me false ?
Thanks for this post it has been usefull for me !
paolo
|
|
|
|
|
Greetings:
Got the DB and code all set, but my page returns the following error:
Parser Error Message: Could not load type 'Andri.Web.MySqlRoleProvider'.
Source Error:
Line 29:
|
|
|
|
|
Tries to put the MySqlRoleProvider.cs and MySqlRoleProvider.cs in the App_Code ASP.NET folder of the your project. Moreover, put the MySql.Data.dll in the Bin ASP.NET folder of the your project and remove all reference to this dll in the project. It would have to work.
|
|
|
|
|
Still Same Problem, also i need to include AjaxControlToolkit.dll into Bin Folder, will it cause any problem?
-- modified at 22:06 Tuesday 20th March, 2007
|
|
|
|
|
How can I do to set the session value = the logged username with this provider?
Thanks!
|
|
|
|
|
I created a MySQL Profile Provider for myself and posted it on this site. Here is a link article
I didn't create it from scratch I used a MSAccess sample as a template and modified it to work with MySql. It seems to work pretty well. Maybe some other people will try it and let me know if there are any major issues.
-- modified at 16:12 Wednesday 28th June, 2006
|
|
|
|
|
I put the wrong link in the previous post. Here is the correct Link Profile Provider
|
|
|
|
|
Its telling me that I cannot access the database, but I know my user name is right
This happens whenever the "throw e" statement happens
If anyone can help it would be greatly apretiated
|
|
|
|
|
the "throw e" statements were there to on purpose, to halt the execution and show you that something went wrong with the mysql connection.
Note :
New version of this article here[^]
This is the last day I am replying to comments on this page.
|
|
|
|
|
Thanks for the great work! It helped me a lot.
What I was missing was an email validation and a check for the minimum password length.
What do you think about inserting these lines in method CreateUser?
if (password.Length < pMinRequiredPasswordLength)<br />
{<br />
status = MembershipCreateStatus.InvalidPassword;<br />
return null;<br />
}<br />
string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +<br />
@"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +<br />
@".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";<br />
Regex re = new Regex(strRegex);<br />
if (!re.IsMatch(email))<br />
{<br />
status = MembershipCreateStatus.InvalidEmail;<br />
return null;<br />
}
-- Gunter Heiss.
|
|
|
|
|
I don't think that this is a good idea.
I think that it is not the provider's role to do checkings. Do your own checking with the asp.NET webforms validation controls.
Note :
New version of this article[^]
This is the last day I am replying to comments on this page.
|
|
|
|
|
Thank you. I was faced with the problem of having few MSSQl resources but a ast amount of mySQL resources. You article and code will help me make good use of the DBs that are available to me. This was a big help and greatly appreciated.
--Frank Jones
|
|
|
|
|
I realise this has been asked before, but is anyone aware of or working on a profile provider for .NET - MySql?
Have searched extensively on the internet and came up with the following-
Create my own (Document covers some of the areas of the creating a customised searching provider, but beyond my abilites)- http://www.theserverside.net/tt/articles/showarticle.tss?id=CreatingProfileProvider
Pay CoreLab a large amount for the priveledge (Not an option) - http://www.crlab.com/mysqlnet/[^]
Any help or direction would be greatly appreciated.
|
|
|
|
|
|
Have any idea how to use the server explorer in vs.net to manage mysql databases? Is there any way to show this up? Sorry for the offtopic
|
|
|
|
|
Im not expert, but from what I have seen there are currently two commonly used methods of connecting .NET to MySql:
Connector/net - Faster than the other but does not provide server explorer support.
Connector/ODBC - Slower but does provide server explorer support.
Either connectors can be found here:
http://www.mysql.com/products/connector/[^]
If you are looking to simply manage data, I would recommend SQLyog (Third party tool, but very good in my opinion.
Hope this helps.
|
|
|
|
|
First, thanks for that lovly code you have submitted. However I seem to have some problems. I'm wondering, is there some settings that has to be set if my mysql database is on a remote server? The error message longer down in the thread does not indicate that.
I have created the tables and I'm able to connect to this tables through normal code so to speak and use of the mysql driver.
Tips?
I also added the code to verify that things are setup correct.Testcode
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myConnection As MySqlConnection
Dim myDataAdapter As MySqlDataAdapter
Dim myDataSet As DataSet
Dim strSQL As String
Dim iRecordCount As Integer
myConnection = New MySqlConnection(ConfigurationManager.ConnectionStrings("ConnString").ConnectionString)
strSQL = "SELECT * FROM users;"
myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)
myDataSet = New Dataset()
myDataAdapter.Fill(myDataSet, "mytable")
GridView1.DataSource = myDataSet
GridView1.DataBind()
End Sub
Action: GetUserNameByEmail
Exception: MySql.Data.MySqlClient.MySqlException: Table 'wno36258.Users' doesn't exist
at MySql.Data.MySqlClient.PacketReader.CheckForError()
at MySql.Data.MySqlClient.PacketReader.ReadHeader()
at MySql.Data.MySqlClient.PacketReader.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(Int64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.CommandResult.ReadNextResult(Boolean isFirst)
at MySql.Data.MySqlClient.CommandResult..ctor(Driver d, Boolean isBinary)
at MySql.Data.MySqlClient.NativeDriver.SendQuery(Byte[] bytes, Int32 length, Boolean consume)
at MySql.Data.MySqlClient.MySqlCommand.GetNextResultSet(MySqlDataReader reader)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
at Andri.Web.MySqlMembershipProvider.GetUserNameByEmail(String email)
Jone says:
There is no spone
|
|
|
|
|
strSQL = "SELECT * FROM wno36258.Users;"
If I added the wno36258.Users in the test code it got the same error. But why does it include the database name in front?
Jone says:
There is no spone
|
|
|
|
|
I had to create the database table with the database name before the table name. Did not think that was nesccary.
CREATE TABLE `wno36258`.`Users` (<br />
`PKID` VARCHAR( 36 ) NOT NULL ,<br />
`Username` VARCHAR( 255 ) NOT NULL ,<br />
`ApplicationName` VARCHAR( 100 ) NOT NULL ,<br />
`Email` VARCHAR( 100 ) NOT NULL ,<br />
`Comment` VARCHAR( 255 ) ,<br />
`Password` VARCHAR( 128 ) NOT NULL ,<br />
`PasswordQuestion` VARCHAR( 255 ) ,<br />
`PasswordAnswer` VARCHAR( 255 ) ,<br />
`IsApproved` TINYINT( 1 ) ,<br />
`LastActivityDate` DATETIME,<br />
`LastLoginDate` DATETIME,<br />
`LastPasswordChangedDate` DATETIME,<br />
`CreationDate` DATETIME,<br />
`IsOnLine` TINYINT( 1 ) ,<br />
`IsLockedOut` TINYINT( 1 ) ,<br />
`LastLockedOutDate` DATETIME,<br />
`FailedPasswordAttemptCount` INT( 11 ) ,<br />
`FailedPasswordAttemptWindowStart` DATETIME,<br />
`FailedPasswordAnswerAttemptCount` INT( 11 ) ,<br />
`FailedPasswordAnswerAttemptWindowStart` DATETIME,<br />
PRIMARY KEY ( `PKID` )
)
Jone says:
There is no spone
|
|
|
|
|
I am trying to get this running on my host's server (works fine on my desktop)... however, I am running into this problem...
Line 29:
|
|
|
|