Please wait! The SQL-Server database could not be opened ('') - the error is: System.Data.SqlClient.SqlException (0x80131904): Login failed for user ''.
Ever ran into this problem with Dynamicweb, and thought you had set up everything correctly?
Well, I had to set up IIS, SQL Server and a new local installation of Dynamicweb up on a new machine.
Installed IIS8 and SQL Server Express 2012.
I created a new website in IIS and pointed it to the application folder as well as a virtual directory for the files folder.
<password>mypass</password> <type>ms_sqlserver</type> <username>myuser</username> <database>mydatabase</database> <sqlserver>.\sqlexpress</sqlserver> <integratedsecurity>false</integratedsecurity>
I downloaded and restored the DefaultEmptyData8SQL.zip database from developer.dynamicweb-cms.com
Mapped “myuser” to the database and gave it following database roles: db_datareader, db_datawriter, db_ddladmin and public.
Even though, I still got this error.
One thing I forgot, was to enable “SQL Server and Windows Authentication mode”, as this was a new installation of SQL Server.
Here’s how to do it, if you didn’t enable it in the installation process:
Go into SQL Server Management Studio – Win+R type ssms [Enter]
Right click your SQL instance – mine is called “.\sqlexpress (SQl Server version number – User\PC-Name)
Click on “Properties”, Go into “Security” chose “SQL Server and Windows Authentication mode” and then click [Ok]
You’ll need to restart your SQL Server for the changes to take effect:
Win+R – cmd [Enter]
Stop and start SQL Server (Express)
net stop mssq$sqlexpress
net start mssql$sqlexpress