iantull
Posts: 34
Joined: Sun Mar 09, 2008 12:21 pm
Location: Australia

Problems with Install

Sun Mar 09, 2008 4:08 pm

I am trying to install on a shared host. My host provider is godday.com. I have selected Mysql V5.0 and have created a database and DBA. I am using Mysql ODBC 3.51 driver and have the DSN. ASP.NET is 2.0 and is Active, email for buddy has been created and have done all necessary changes in InviteNewTemplate.htm and InviteReminderTemplate.htm plus Web.config. I have changed the permissions in the root of the web folder and uploaded all the ShareHosting files to the host. I can go into myweb/SiteAdmin/Index.aspx and it opens the setup. I add the admin name, password etc and when I select "Create new Admin User", I get the following error.

-----
Server Error in '/' Application.

Unable to connect to the database. Please check that the database server is running and that the connection string in the Web/App.config is valid. Error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
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: Franson.DAO.DatabaseException: Unable to connect to the database. Please check that the database server is running and that the connection string in the Web/App.config is valid. Error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[DatabaseException: Unable to connect to the database. Please check that the database server is running and that the connection string in the Web/App.config is valid. Error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified]
Franson.DAO.DAOFactory.ResolveConnection(OdbcConnection connToUse) +296
Franson.Install.DB.DAO.ModuleDAOSQL.ExecuteQuery(String strCommand) +83
Franson.Install.DB.DAO.ModuleDAOMySQL.GetTables() +35
Franson.Install.DB.ModuleVersionCollection.get_m_versionTableExists() +14
Franson.Install.DB.ModuleVersionCollection.LoadAllVersion() +30
Franson.Install.DB.Module.CheckDependencies(ModuleVersion[] packageModules) +117
Franson.Install.DB.Package.CheckDependencies() +122
Franson.Install.DB.PackageManager.GetAvailablePackages() +724
GpsGate.SiteAdmin.WebUI.Index.ViewInstallProcess_Activate(Object sender, EventArgs e) +18
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.WebControls.View.OnActivate(EventArgs e) +105
System.Web.UI.WebControls.MultiView.set_ActiveViewIndex(Int32 value) +395
System.Web.UI.WebControls.MultiView.SetActiveView(View view) +45
GpsGate.SiteAdmin.WebUI.Index.CreateUserControl_CreateClicked(Object userControl, EventArgs cue) +630
GpsGate.WebControls.CreateUserControl.ButtonCreateUser_Click(Object sender, EventArgs e) +112
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
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) +5102

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
---------------
I have checked the spelling etc of the DSN in the web.config and made sure that there are no "" missing etc against the original web.config, when I setup the original DSN using the wizard, I gave it a name and the wizard added mysql_ as a prefix to the name I gave it plus added a .dsn as a suffix. I have tried both mysql_myname.dsn as the dsn in web.config as well as just myname, but the same error occures.

When I go into the help files on the Hosts website to check for information on connections to the database they suggest the following,
---------
The following is a list of database connection strings to use with various MySQL data providers. Cut and paste the connection string to use within your application. For connection strings that require a password, update the password field to the designated password for the database.
• ODBC 3.51:
• DRIVER={MySQL ODBC 3.51 Driver}; SERVER=p50mysql113.secureserver.net; PORT=3306; DATABASE=your_databasename; USER=your_username; PASSWORD='your_password'; OPTION=0;
--------

They also have this example that describes using File DSN and ASP/ADO to connect to a MySQL Database.
---------
<%
Dim oConn, oRs
Dim qry, connectstr, sDSNDir
Dim db_name, db_username, db_userpassword
Dim db_server, dsn_name

dsn_name = "your_dsn_name"
fieldname = "your_fieldname"
tablename = "your_tablename"

sDSNDir = Server.MapPath("_dsn")

connectstr = "filedsn=" & sDSNDir & "" & dsn_name

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " & tablename

Set oRS = oConn.Execute(qry)

if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & "
"
oRS.movenext
wend
oRS.close
end if

Set oRs = nothing
Set oConn = nothing

%>
--------------
I am hoping someone may be able to help me with this as I have now tried to install this 4 times, the same error keeps occuring.

Thanks
Ian

User avatar
Bjorn_Andersson
GpsGate
Posts: 466
Joined: Wed Jun 28, 2006 5:20 pm
Location: Sweden
Contact: Website

RE: Problems with Install

Mon Mar 10, 2008 11:30 am

Hi!
Sometingh is wrong with your database connection. Double check the DSN setup.

You could also try using the connection string above instead of DSN name in the web.config.

e.x
<add name="ConnStr" connectionString="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=p50mysql113.secureserver.net; PORT=3306; DATABASE=your_databasename; USER=your_username; PASSWORD='your_password'; OPTION=0;"/>

Regards,
Franson Support
Bjorn Andersson

iantull
Posts: 34
Joined: Sun Mar 09, 2008 12:21 pm
Location: Australia

RE: Problems with Install

Mon Mar 10, 2008 6:40 pm

Thanks Bjorn, that worked at least to find the database, but will not allow connection. The following error now occurs. Unable to connect to the database.
"Please check that the database server is running and that the connection string in the Web/App.config is valid. Error: ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Access denied for user 'username'@'ip-address' (using password: YES)" I am not sure why this is, I am able to log into this database using the host supplied access via phpmysqladmin, using the same username and password as the one I tried in the install. I am assuming this error is a "privileges" error and have sent an email to Godaddy support to question what privileges have been created when this user was setup. I will see what they say, but if you have any suggestions please feel free to supply them.

Thanks
Ian

Return to “GpsGate Server - How to setup and use”