This project is read-only.


Connections missing


When I use any function where I have to assign a connection (Create CRUD Stored Procedures), I can only use one connection "LocalSqlServer". This one isn't in the project at all and using it won't let you connect to any database.
Closed Dec 10, 2007 at 6:17 PM by donsmith
This issue is being closed because it is related to the Data Access Guidance Package that was released with the second version of the Service Factory. This guidance package has since been taken out of the Service Factory project and made its own project called the Repository Factory. This project's community site can be found at


donsmith wrote Apr 25, 2007 at 10:06 PM

There is a recipe for defining database connections. This recipe is available on projects that have config files in them (I'm pretty sure of this, but not 100%). All connection strings are maintained in the web.config and app.config files. If you lose these files or the DatabaseConnection section in the file is removed, you will lose your database connections. If you are arbitrarily loosing connection strings that were there before and it is not due to missing config files, that is a bug we've never heard of before. Let us know how things work out. Thanks.

Ringerrr wrote Apr 25, 2007 at 10:06 PM

I had the same problem and although I attempted to create my own config files this still did not address the underlying problem (presumably due to the fact that I must've either messed up or were missing some settings). However, out of desperation I attempted a 'build' of the project and as soon as I had done so was suddenly able to add new data sources to the project. Woo-hoo! Imagine my childlike surprise & delight to then discover that my config files had also magically been populated with the right values for the guidance packages to work also as a result. Problem solved (for me at least).

michel wrote Apr 25, 2007 at 10:06 PM

I've created a new host project and in that host project I created a connection which can be used. So for now I can use that as a workaround.

michel wrote Apr 25, 2007 at 10:06 PM

This is my configuration section: <connectionStrings> <add name="TestA" connectionString="Data Source=(local);Initial Catalog=TestB;Integrated Security=True" providerName="System.Data.SqlClient"/> <add name="TestB" connectionString="Data Source=(local);Initial Catalog=TestA;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings>

I build everything and then tried to create stored procedures again. The web.config is validated. But it still only showed LocalSqlServer.

BinDrinkin wrote Apr 25, 2007 at 10:06 PM

Having the same problem. Connection strings are in the web.config of the host project and correct (created them again using recipe) but when i try to add business entity no connections are available in the drop down. The host project is showing in the top drop down correctly. Have tried the rebuild fix above with no luck. There is no error message of info to give an idea where the problem is occuring. This issue has rendered the recipe's useless to us. Is there any fix available?

charlyfriend wrote Apr 25, 2007 at 10:06 PM

Do you have your <connectionStrings> element located as a child of the <configuration> root node?If answer is yes, then which version of GAX, WSSF are you using?

BinDrinkin wrote Apr 25, 2007 at 10:06 PM

web.config :<configuration> <connectionStrings> <add name="DBConnectionC002" connectionString="Data Source=SERVER;Initial Catalog=DATABASE;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="DBConnectionC001" connectionString="Data Source=SERVER;Initial Catalog=DATABASE;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings/></configuration>

as created using the "Add Database Connection" recipe

Versions: GAX June 2006 CTPWSSF 1.0 (December 2006 refresh)

Finally fixed the problem with a workaround today. We copied the web.config file and renamed it as app.config in the same directory and the guidance packages started picking up the connection strings again.

bojxx wrote May 3, 2007 at 3:36 PM

What's up with configSections?

wrote May 4, 2007 at 1:25 PM

wrote May 21, 2007 at 4:05 PM

wesweeks wrote May 21, 2007 at 4:08 PM

I am seeing this same issue as well. The connections are not missing from the web.config, they are just not available to choose in the drop down list even when you have the correct host project selected. My work around was to create a new host project and copy the connection string from the original project to the new one. In the create crud stored procedures or create business entities recipie I just choose the new host project and I can move forward.

wrote Aug 10, 2007 at 6:43 AM

ThorBucy wrote Aug 25, 2007 at 12:09 AM

This same behavior happens to us when we change the Host web site to a Web Project. I.e, we remove the Web Site, add a new Web Project and set the Project Responsibilites for that new Web Project to be the Host project.

The workout of renaming the web.config to app.config seems to resolve the problem.

wrote Dec 10, 2007 at 6:17 PM

wrote Feb 22, 2013 at 12:46 AM

wrote May 16, 2013 at 12:08 PM

coach008 wrote Nov 6, 2015 at 1:45 AM