0

I just deployed my website on IIS and fixed the connection to database via (LocalDB).\IIS_DB in my Web.config file for the connection string.

These 2 links for what i said above,

Using LocalDB with Full IIS, Part 1: User Profile,

Using LocalDB with Full IIS, Part 2: Instance Ownership

Everything works well

When i accessed the starting page which is set for Login.aspx, what i set in Default Document in IIS i could login with an account found from the database. But now when i accessed another page named AdminPanel.aspx i got this error down below..

error

I tried searching over stackoverflow to look for solutions but nothing seems to solve this error..

My web.config file from my publised website on IIS

webconfig

Appreciate any help please.. I'm guessing this is the last error before i complete my school project - Publishing WebSite onto IIS to allow other computer in my network to access my site.. Thank you!

domster
  • 556
  • 2
  • 8
  • 26

1 Answers1

1

Check your SQL DB, the MDF file that you are connecting is already present in DB server. Attach MDF file don't need the DB created in DB server.

Check your DB connection string.

Mohan Srinivas
  • 302
  • 3
  • 13
  • Thank you for your prompt reply Mohan.. I just have to remove this "AttachDbFileName=|DataDirectory|\FinancialHub.mdf"? – domster Jul 28 '17 at 09:53
  • Not like that.First check your db.Attached MDF, containing tables or not.Then change the connection string based on your requirement. – Mohan Srinivas Jul 28 '17 at 10:53