0
votes

I am currently trying to set-up a Sitecore project on my PC. When I go to view the project on my browser I get the following error:

Sitecore Cannot open database "marktwoSitecore_Web" requested by the login. The login failed. Login failed for user 'blah''.

These are the steps that I have carried out so far:

1) Firstly there are three types of sitecore installations to do: - Complete - Database only - Client only I have gone with the Client only installation.

2) The Sitecore "Client-only" installation instance was made inside the inetpub/ wwwroot folder.

3) I then made a visual studio project

4) I made a folder called "Libraries", which is located in the root of my visual studio project solution. I copied over all the relevant Sitecore.dll's from the wwwroot project to my visual-studio project into the Libraries folder. I also replaced the Default web.config file in my Visual studio project with Sitecore's version of Web.config. And then I added Sitecore references to my Visual Studio project.

6) With all of the initial configuration done; I set-up a publish profile so that I could publish my C# code to inetpub/wwwroot project. I did step four so that my publish would not overwrite sitecore dlls.

5) I changed the Connection strings in App_Config/ConnectionStrings.config to point to the Web, core and master sitecore databases. That were created during the Sitecore installation.

Those were the steps I did prior to getting the error about invalid login credentials. I am not sure why I am getting this error; since I went into Microsoft SQL server Management Studio and I gave the user "blah" admin rights to all of the datbases: Master, web and core.

Any support and guidance would be greatly appreciated; as I am unsure of how to address this problem

1
are you using windows authentication to login to sql? - Ayman Barhoum

1 Answers

0
votes

This error is happening because the web database referenced in your Website/App_Config/ConnectionStrings.config is either not there or the permissions are not set properly on that database. The easiest way to troubleshoot is to load SQL Server Management Studio specifying the host, username and password that are in your connection strings and see if it connects. It sounds like you are probably logging in with your Windows user when you are making the changes listed above.

You could try making the blah user a "db_owner" to see if that helps or your local instance may not be in "mixed authentication mode" which allows for named users and windows users. You can change that in the settings, but you need to restart the service for it to take effect.