thanks for replying so fast, i've already try your advice but i'm getting the same error, maybe the fact that the second web.config is in a WCFService project has something to do with ? In my first web config i got the connectionString, and i want to use that connection in the second webconfig without declaring again.
First web.config (Main WebApp Project) <connectionStrings> <add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=True;User Instance=True;AttachDBFilename=C:\MyDocuments\Projects\Test\App_Data\Test05.mdf;" providerName="System.Data.SqlClient" /> </connectionStrings>
Second web.config (ServiceProject)
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> <property name="connection.connection_string_name">SiteSqlServer</property> </session-factory> </hibernate-configuration>
This one above doesn't work. but if i add the same <connectionString> tag like in the First web.config it works fine but that is what i want to avoid. The two web.config files are in separate projects.
|