Tip ~LOCALDB How to successfully configure on IIS

Source: Internet
Author: User
Tags microsoft sql server management studio microsoft sql server management studio sql server management sql server management studio

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.