Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Giovanny Temgoua 4/14/2007 4:18 AM (edited 4/14/2007 1:21 PM)
Hello !

I've downloaded the binary of the latest version yesterday and try to install it.

I correctly unzipped the archive and create the virtual directory in IIS. I then follow instructions in the install.txt to modify the properties.config file located in (Root)/Config/ and modify it with correct parameters.


I then go to the URL http://localhost/cuyahoga/Install/Install.aspx but i get this error
Cuyahoga Installation
An error occured:

NHibernate.ADOException: Could not create connection from Driver ---> System.Data.SqlClient.SqlException: Échec de la connexion de l'utilisateur 'KSERVER\ASPNET'. at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at NHibernate.Connection.DriverConnectionProvider.GetConnection() --- End of inner exception stack trace --- at NHibernate.Connection.DriverConnectionProvider.GetConnection() at Cuyahoga.Core.Util.DatabaseUtil.GetAssemblyVersion(String assembly) at Cuyahoga.Core.Service.DatabaseInstaller.CheckCurrentVersionInDatabase() at Cuyahoga.Core.Service.DatabaseInstaller..ctor(String installRootDirectory, Assembly assembly) at Cuyahoga.Web.Install.Install.Page_Load(Object sender, EventArgs e)

The MySQL server (version 5) is running and here are the correct parameter to get connected.

Why does i have to "botter" with the driver of Sql server here ??? I means System.Data.SqlClient.SqlException ?

I then re-modify the properties.config file to point to an existing empty Sql Server 2000 database but i still get the same error.

Have I missing something ?

PS : I can post the content of the properties.config file. When i try, i always get an Error 500 message !!!!

I need some assistance please.
# martijnb 4/14/2007 10:42 AM (edited 4/14/2007 10:43 AM)
You have to disable the SQL Server section in properties.config and enable the MySQL section like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<properties>
		<!-- Database -->

		<!-- SQL Server settings -->
		<!--					
		<connectionString>Server=(local);Database=Cuyahoga;Integrated Security=SSPI</connectionString>
		<nhibernateDriver>NHibernate.Driver.SqlClientDriver</nhibernateDriver>
		<nhibernateDialect>NHibernate.Dialect.MsSql2000Dialect</nhibernateDialect>
		

		PostgreSQL settings
			  
		<connectionString>Server=localhost;Port=5432;Database=cuyahoga;uid=;pwd=</connectionString>
		<nhibernateDriver>NHibernate.Driver.NpgsqlDriver</nhibernateDriver>
		<nhibernateDialect>NHibernate.Dialect.PostgreSQLDialect</nhibernateDialect>
			  
		MySQL settings
		-->	  
		<connectionString>server=localhost;database=cuyahoga;uid=;pwd=;</connectionString>
		<nhibernateDriver>NHibernate.Driver.MySqlDataDriver</nhibernateDriver>
		<nhibernateDialect>NHibernate.Dialect.MySQLDialect</nhibernateDialect>
		
		
		<!-- Email. -->
		<!-- Important: also update services.config when setting port, username, password and encoding -->
		<smtpHost>localhost</smtpHost> <!-- required-->
		<smtpPort></smtpPort>
		<smtpUsername></smtpUsername>
		<smtpPassword></smtpPassword>
		<emailEncoding></emailEncoding> <!-- iso-8859-1, utf-8, us-ascii, etc.  -->
		
	</properties>
</configuration>

Btw, I always replace all angle brackets with their htmlencoded versions before posting. It's a security setting of ASP.NET that doesn't allow angle brackets to be posted.
# Giovanny Temgoua 4/14/2007 1:26 PM
Thanks for your answer !

In the properties.config file, i've completly delete the section concerning PostGre and SQl Server and remain with the section of MySQL only. I was unable to post the content of my properties.confif file because i don't know i must remplace the angle brackets with their HTML encoded equivalent - though, IMO i find it a bit awkward.

And as i say,
I then re-modify the properties.config file to point to an existing empty Sql Server 2000 database but i still get the same error.

I've then compleylt remove section concerning POsgre and MySQL and remain only with the one concerning SQL Server. The User ID and password are well defined, but i still get the error...

I will test it again this night and try to post my properties.config file if i remain in problems.

Thanks.
# Giovanny Temgoua 4/14/2007 3:17 PM
Evening,

I've just try and i don't get expected result !

Here is the properties.config file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<properties>
<connectionString>Data Source=.;Initial Catalog=Cuyahoga;Integrated Security=True</connectionString>
<!--Also tested with

<connectionString>Server=(local);Database=Cuyahoga;Integrated Security=SSPI</connectionString>

and i get the same error!
-->
<nhibernateDriver>NHibernate.Driver.SqlClientDriver</nhibernateDriver>
<nhibernateDialect>NHibernate.Dialect.MsSql2000Dialect</nhibernateDialect>

<smtpHost>localhost</smtpHost>
<smtpPort></smtpPort>
<smtpUsername></smtpUsername>
<smtpPassword></smtpPassword>
<emailEncoding></emailEncoding>

</properties>
</configuration>

I always get error saying that the user ASPNET cannot connect on KServer (my local server).

As i can't join file to my message, here is some messages that are returned :
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.

The stacktrace :
[SqlException (0x80131904): Échec de la connexion de l'utilisateur 'KSERVER\ASPNET'.]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
NHibernate.Connection.DriverConnectionProvider.GetConnection() +71

[ADOException: Could not create connection from Driver]
NHibernate.Connection.DriverConnectionProvider.GetConnection() +119
NHibernate.Impl.SessionFactoryImpl.OpenConnection() +29

[ADOException: cannot open connection]
NHibernate.Impl.SessionFactoryImpl.OpenConnection() +83
NHibernate.Impl.SessionImpl.get_Connection() +32
NHibernate.Impl.BatcherImpl.Prepare(IDbCommand command) +105
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) +24
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) +175
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +243
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +65
NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) +169
NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters) +64
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +200

[ADOException: Could not execute query]
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +255
NHibernate.Impl.QueryImpl.List() +84
NHibernate.Impl.AbstractQueryImpl.UniqueResult() +7
Cuyahoga.Core.DataAccess.SiteStructureDao.GetSiteAliasByUrl(String url) +201
ProxyInterfaceDataAccessSiteStructureDao_ISiteStructureDao_ISerializable.callback__GetSiteAliasByUrl(String ) +10
__delegate_2.Call(Object[] ) +52
Castle.Windsor.Proxy.DefaultMethodInvocation.Proceed(Object[] args) +164
Castle.Facilities.AutomaticTransactionManagement.TransactionInterceptor.Intercept(IMethodInvocation invocation, Object[] args) +169
Castle.Windsor.Proxy.DefaultMethodInvocation.Proceed(Object[] args) +123
Castle.Windsor.Proxy.InterceptorChain.Intercept(IMethodInvocation invocation, Object[] args) +182
ProxyInterfaceDataAccessSiteStructureDao_ISiteStructureDao_ISerializable.GetSiteAliasByUrl(String url) +105
Cuyahoga.Core.Service.SiteStructure.SiteService.GetSiteAliasByUrl(String url) +10
Cuyahoga.Web.UI.PageEngine.OnInit(EventArgs e) +53
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692

Please, can you tell me where is the problem ?
# mgaerber 4/15/2007 2:10 AM
Hi,

have you set up a new db? Have you checked that the ASPNET account has the correct rights to access the db?

Regards,

Max

# Giovanny Temgoua 4/15/2007 5:02 AM
mgaerberHi,

have you set up a new db? Have you checked that the ASPNET account has the correct rights to access the db?

Regards,

Max
Yes.

I copy/paste this connecting string from a connection i made within Visual Studio
Data Source=.;Initial Catalog=Cuyahoga;Integrated Security=True

There is no problem with the ASPNET account as other application can connect to the database - i've installed the YAF forum...

I've SQL Server 2000 and i've not set particular right for the database; just as "usual" and it works fine until i want to test Cuyahoga...
# martijnb 4/15/2007 5:42 AM
Giovanny Temgoua
Data Source=.;Initial Catalog=Cuyahoga;Integrated Security=True

There is no problem with the ASPNET account as other application can connect to the database - i've installed the YAF forum...

I've SQL Server 2000 and i've not set particular right for the database; just as "usual" and it works fine until i want to test Cuyahoga...

Well, that's the problem then. The 'usual' settings on SQL Server don't allow the ASPNET user to access the database. You explicitly have to grant the ASPNET user rights to the Cuyahoga database.
# Giovanny Temgoua 4/15/2007 10:18 AM
martijnbWell, that's the problem then. The 'usual' settings on SQL Server don't allow the ASPNET user to access the database. You explicitly have to grant the ASPNET user rights to the Cuyahoga database.
Thanks for your answer.

It's very strange ... because i set up the YAF database in the same manner and i've no problem.

Could you please explain me how to grant access to the ASPNET account ?
# martijnb 4/15/2007 11:40 AM
Giovanny TemgouaCould you please explain me how to grant access to the ASPNET account ?

Please, do a google search or check the books online. There are lots of examples how to do this.
# Giovanny Temgoua 4/16/2007 5:20 AM (edited 4/16/2007 5:32 AM)
martijnbPlease, do a google search or check the books online. There are lots of examples how to do this.

Finally it's up and running :)

Thanks for the support !

However, isn't it a "limitation" to specifically grant right to the ASPNET account ? If i want to install Cuyahoga on my web site, i'm not sure my "hoster" will to this job for free...
# martijnb 4/17/2007 6:11 AM
Giovanny TemgouaHowever, isn't it a "limitation" to specifically grant right to the ASPNET account ? If i want to install Cuyahoga on my web site, i'm not sure my "hoster" will to this job for free...

Most hosters give you a specific username/password combination for the database. In that case you have to change the connectionstring to use that username/password combination:
<connectionString>Server=yourserver;Database=Cuyahoga;uid=your_username;pwd=your_password</connectionString>