views:

886

answers:

2

Hello,

I am trying to get started with Silverlight. I have created a new Silverlight Business Application. The first thing I need to do with this business application is authenticate a user using the ASP.NET membership provider. I have already created my user via the Web Site Administration tool accessible through Visual Studio (Project -> ASP.NET Configuration). However, when I attempt to login from my Silverlight application, I receive an error that says:

"Login operation failed for query 'Login'. Unable to connect to SQL Server database."

What am I missing?

Thank you!

A: 

Check that your ASP.NET authentication connection string in your web.config doesn't have integrated authentication set... change it to use SQL server auth - or...

Alternatively run your IIS as a user that has permission to the database that you are trying to access. If you are using the VS in built dev IIS server (Cassini) then it should trying to connect as the current logged on user from memory.

Maybe post your connection string here (without any usernames or passwords!).

If you have the full version of SQL server installed, you can try using the SQL profiler to see auth issues.

Jordan
A: 

I was having the same problem and this post helped

I had given my sql express instance a different name instead of the default. I had to make the change in C:\Windows\Microsoft.NET\Framework\v4.0.21006\Config also.

Also, make sure you have <roleManager enabled="true"/> in your project's web.config

Elfreda