Problem with MySQL connection
-
I'm attempting to connect to a MySQL database from my ASP.NET application (c#). Here's my code: string connString = "Database=games;Data Source=http://[my server's IP]/mysql;User ID=group; Password=" + strSystemPasswords[3]; conn = new MySqlConnection(connString); conn.Open(); The database is contained in the mysql directory under the web server's root. (I added a space between group; and Password to prevent a smiley.) When I run the code, I get the following error for conn.Open(): "The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for " I've researched the problem and have found the standard answer is that the address can't be resolved. However, I am assuming that this is not the problem in my case, as I can navigate to that exact address with my web browser. But I haven't found any alternate causes for this error. Any suggestions? Thanks for your help!
-
I'm attempting to connect to a MySQL database from my ASP.NET application (c#). Here's my code: string connString = "Database=games;Data Source=http://[my server's IP]/mysql;User ID=group; Password=" + strSystemPasswords[3]; conn = new MySqlConnection(connString); conn.Open(); The database is contained in the mysql directory under the web server's root. (I added a space between group; and Password to prevent a smiley.) When I run the code, I get the following error for conn.Open(): "The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for " I've researched the problem and have found the standard answer is that the address can't be resolved. However, I am assuming that this is not the problem in my case, as I can navigate to that exact address with my web browser. But I haven't found any alternate causes for this error. Any suggestions? Thanks for your help!
Your datasource is local to the server. ASP.NET is a server-side only technology that generates HTML for a client. Change your "Data Source" so your code is looking for it local to the server filesystem, not over an http connection. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome