set the MySQLconnectionstring in dnn using dotConnect?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
kavithaboi
Posts: 5
Joined: Thu 30 Sep 2010 06:32

set the MySQLconnectionstring in dnn using dotConnect?

Post by kavithaboi » Tue 05 Oct 2010 09:47

I have changed the mysql connectionstring
in web.config of dnn as
"host=localhost;Data Source=test;User id=username;Password=password;Unicode=true".

But i got the following exception.

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

Connection parameter 'host' is duplicated.
Parameter name: host
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.ArgumentException: Connection parameter 'host' is duplicated.
Parameter name: host


Please help me to solve it.
Thanks in advance!

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 05 Oct 2010 11:16

The Server and Data Source parameters are synonyms (they have the same meaning). Please refer to http://www.devart.com/dotconnect/mysql/ ... tring.html . The name of the database should be set with the Database parameter.

Please try the following connection string:
“Host=localhost;Database=mydb;User Id=root;Password=root123!;Unicode=true”.

kavithaboi
Posts: 5
Joined: Thu 30 Sep 2010 06:32

Post by kavithaboi » Tue 05 Oct 2010 11:29

Now I got following exception,

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

Invalid operation. The connection is closed.
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.InvalidOperationException: Invalid operation. The connection is closed.

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.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 06 Oct 2010 10:34

1. Please post here your stack trace.
2. Tell us the steps we should follow to reproduce the error. Did you encounter this problem during the initialization routine of the site when following the wizard?

We have removed your same post in other thread as duplicated.

kavithaboi
Posts: 5
Joined: Thu 30 Sep 2010 06:32

Post by kavithaboi » Wed 06 Oct 2010 11:47

I have changed the connection string in web.config after that I got this exception while running the application.


Stack Trace:


[InvalidOperationException: Invalid operation. The connection is closed.]
CoreLab.Common.DbConnectionClosed.BeginTransaction(IsolationLevel il) +53
CoreLab.Common.DbConnectionBase.BeginDbTransaction(IsolationLevel isolationLevel) +16
CoreLab.MySql.DNN.DataProvider.MySqlHelperParameterCache.GetSpParameterSetInternal(MySqlConnection connection, String spName, Boolean includeReturnValueParameter) +39
CoreLab.MySql.DNN.DataProvider.MySqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +79
CoreLab.MySql.DNN.DataProvider.MySqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +76
DotNetNuke.Data.CoreLabMySqlDataProvider.GetPortalAliasByPortalID(Int32 PortalID) +84
DotNetNuke.Entities.Portals.PortalAliasController.GetPortalAliasByPortalID(Int32 PortalID) +35
DotNetNuke.Entities.Portals.PortalSettings.GetPortalAliasLookup() +74
DotNetNuke.Entities.Portals.PortalSettings.GetPortalAliasInfo(String PortalAlias) +14
DotNetNuke.HttpModules.UrlRewriteModule.RewriteUrl(HttpApplication app) +3426
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +844
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +117

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 06 Oct 2010 12:30

Please tell us:
1) the version of dotConnect for MySQL you are using (x.xx.xxx). You can find it via the Tools > MySQL > About menu of Visual Studio.
2) the version of your MySQL Server (x.x.xx). Is it installed locally or at the remote workstation?
3) the version of your Internet Information Server;
4) the version of ASP.NET Framework you are using;
5) when did you download DotNetNuke Data Provider for MySQL from http://www.devart.com/dotconnect/mysql/mysqldnn.zip (it was updated Oct 02, 2010)?

kavithaboi
Posts: 5
Joined: Thu 30 Sep 2010 06:32

Post by kavithaboi » Thu 07 Oct 2010 04:43

version of dotConnect : 6.0.10.0 Beta
Version of MySQL server: 5.1.48-community on local machine
version of your Internet Information Server : 5.1
visual studio 2005
MYSQLDNN downloaded date : sep 29 2010

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 07 Oct 2010 14:49

Please download the new version of DotNetNuke Data Provider for MySQL (it is available now at http://www.devart.com/dotconnect/mysql/mysqldnn.zip), reconfigure the DNN sources with this new version again (take the original DNN sources, not those that were affected by the previous version of DNN provider): http://www.devart.com/dotconnect/mysql/ ... s/dnn.html, the Getting Started section.

Post Reply