PDA

View Full Version : web.config


mdean99
07-29-2011, 06:16 AM
I am a bit confused about the way that the web.config works re database connections.
I have the following entry in the web.config file

<connectionStrings>
<add name="StampsForSale"
connectionString="Data Source=xxx.xxx.xxx.xxx;
Initial Catalog=StampsForSale;Persist Security Info=True; Trusted_Connection=False;
User ID=xxxxxxxxxxx;
Password=xxxxxxxxxx" providerName="System.Data.SqlClient" />
</connectionStrings>

This works for default.aspx
but switching to other modules I get the error 'Parser Error Message: The entry 'StampsForSale' has already been added'. There is only one web.config file and I cannot find anywhere how to get round this!
I would appreciate some help.
Thanks

bruce
07-29-2011, 09:52 AM
It is most likely inherited from the parent directory.

mdean99
07-30-2011, 12:33 PM
thanks. That works now.

wisemx
07-30-2011, 02:42 PM
Good job ;-)