Wednesday, 28 August 2013

Website is asking to add app.config file, it is not taking connection string from web.config

Website is asking to add app.config file, it is not taking connection
string from web.config

I have project with 3 tier structure DataAccessLayer, BusinessLogicLayer
and Website.
In my DataAccessLayer I have used F# library project with connectionstring
accessing from app.config file
F# code - type dbSchema = SqlDataConnection<"","MyConnection"> let
connectionString =
System.Configuration.ConfigurationManager.ConnectionStrings.
["MyConnection"].ConnectionString
App.config code -
Now I have given the reference of this dll in website BusinessLogic and
Website project.
I am calling a function of BusinessLogicLayer to get data -
var MyDataList = BusinessLogic.GetAllData().ToList();
Now the issue is I website is searching connectionstring in app.config
file instead of web.config. I want it to take connectionstring from
web.config

No comments:

Post a Comment