Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
My solution explorer looks like this (proprietary bits redacted):

Clickety[^]

OK. So I used a .xsd file which I generated by

1. Clicking to add a new Class Library project called DAL to the Solution and then clicking the Data menu, and then clicking Add New Data Source and going through the whole wizard whatever...

2. I answered yes, save the connection string when the wizard prompted me.

3. The app.config under my __DAL project contains my db connection string

It's a usual 3-tier jazz, and it works fine when I press F5 or CTRL+F5 in the Visual Studio (2010, by the way) and then when I click the Website, click the Build menu, and then click Publish, I get the box

Clickety[^]

Is there something I am setting wrong? Only the web.config file gets published but not the DAL's app.config. Then, when I go to deploy the website and do a test run I get the screen

Clickety[^]

Then when I publish, there's no ___DAL.dll.config file in the \bin subfolder, just the __DAL.dll. Can someone please help me figure out how I would go about setting things up correctly? I'm a bit of a newbie.

Thanks!
Posted
Updated 8-Apr-11 4:20am
v3

1 solution

When you are publishing the website, your host is website, and the configuration file responsible for this is Web.config, you don't need to have app.config with connection strings, but web.config should have, update the connection string section in web.config to point to the right database, i think you should be good.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900