Mayank

Mayank

  • NA
  • 474
  • 24.3k

why we need to copy constring from dll in to web project

Mar 24 2017 6:57 AM
  1. I have created a dll.
  2. I have added a entity model in to above dll.
  3. Connection string generated in appconfig of dll  for entity model.
  4. Then created new project in solution which is web application.
  5. Add a reference of dll in web application.
  6. Add a new webpage in web app and call a entity model to get data from DB.
  7. I found error no connection string found.
  8. When I copy connection string from appconfig of DLL in to wecbconfig of webapplication then error is removed.
I just want to know why I need to copy connection string in to web config whereas I have already added a reference of dll in web project.

Answers (2)