Silverlight Business Application: Unable to connect to SQL Server database.
I’m following the WCF RIA Services Documentation to get up to speed with RIA Services. But in the walkthrough "Using the Silverlight Business Application Template" I got the following error when registering as new user:
Unable to connect to SQL Server database
The reason here is simple. The example uses an ASP.NET SQL Membership Provider and this provider wants to connect to localhost\SQLEXPRESS (and I installed using default instance, so that’s what causing the error).
To solve this issue you need to:
- Open the machine.config located in: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
- Edit the entry LocalSqlServer in connectionStrings and change the data source (in my case I changed from .\SQLEXPRESS to .)
Hope this helps.