S
soni2926
hi,
i have a asp.net soln (vs 2005) which has the following 4 projects in
it
website
BusinessLayer (generates dll)
DataLayer (generates dll)
webservice
in my website project, the web.config file, i have an entry for the
datasource, as
<appSettings>
<add key="ConnString"
value="server=minebox;uid=myID;pwd=myPass;database=MyDB"/>
</appSettings>
</configuration>
when i try to access this in the website project it works fine,
getting it as:
ConfigurationManager.Appsettings["ConnString"];
but if it try the same thing in the DataLayer it returns null, is
there anyway to access it via the DataLayer? If not any suggestions
on how i can have it so the connectionstring is stored outside the
DataLayer DLL, this way the DataLayer can work with different sites
using their connectionstring entries.
I also had tried putting it in the <connectionStrings> section same
thing though, i could get to it in the website project but not outside
it.
Thanks.
i have a asp.net soln (vs 2005) which has the following 4 projects in
it
website
BusinessLayer (generates dll)
DataLayer (generates dll)
webservice
in my website project, the web.config file, i have an entry for the
datasource, as
<appSettings>
<add key="ConnString"
value="server=minebox;uid=myID;pwd=myPass;database=MyDB"/>
</appSettings>
</configuration>
when i try to access this in the website project it works fine,
getting it as:
ConfigurationManager.Appsettings["ConnString"];
but if it try the same thing in the DataLayer it returns null, is
there anyway to access it via the DataLayer? If not any suggestions
on how i can have it so the connectionstring is stored outside the
DataLayer DLL, this way the DataLayer can work with different sites
using their connectionstring entries.
I also had tried putting it in the <connectionStrings> section same
thing though, i could get to it in the website project but not outside
it.
Thanks.