简体   繁体   中英

Connecting to SQL Server; two websites connecting to the same database

I am reproducing a Dev site which points to the same database of the live one just for code changes.

meta.ConnectionString="Provider=SQLOLEDB;Server=CBAHWEB\SQLEXPRESS;Database=livedatabasename;Trusted_Connection=Yes;"
meta.CommandTimeout = 600
meta.open

but I keep getting the cannot log in error on the new dev site

Microsoft OLE DB Provider for SQL Server error '80004005'

Cannot open database "livedatabasename" requested by the login. The login failed.

/dbcommon/connectionfile.php, line 8

Anyone got some tip on where to start fixing this issue?

This error occurs when you have configured your application with IIS, and IIS goes to SQL Server and tries to login with credentials that do not have proper permissions. This error can also occur when replication or mirroring is set up.

Quoted directly from here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM