LocalDB is really handy, it's not as heavy as SQL Server, it can be used for a test demo or a project with a small amount of concurrency, but when it comes to IIS deployment, there may be problems that your IIS might not have access to your localdb, Now let's simply configure it to support iis!
1. Enable shared LocalDB connections on the command line (requires Administrator privileges):
Sqllocaldb Share v11.0 iis_db
2. Connect localdb using Microsoft SQL Server Management Studio:
Server name: (LOCALDB) \.\iis_db
Authentication: Windows Authentication
3. Create a new query to add login and database permissions for the IIS application pool
Note that ASP. NET v4.0 refers to the name of your connection pool, and if your site uses its own connection pool, you need to replace it accordingly.
Create [IIS apppool\asp.net v4.0] from windows; exec sp_addsrvrolemember N'IIS apppool\asp.net v4.0', sysadmin
4. Modify the data source property of the connection string
Original: Data source= (LocalDB) \v11.0
Change: Data source= (LocalDB) \.\iis_db;
5, after running on IIS, it's done!
Tip ~LOCALDB How to successfully configure on IIS