Load Operation Failed for query 'GetYourRecords'
The Admin 4/30/2010 10:24:00 PMOne possible solution to this error from Silverlight when you are trying to connect to a datasource could be the lack of permissions of the IIS user to access the database.Just follow these simple steps to solve the problem. [Source http://codingresource.blogspot.com/2010/01/login-failed-for-user-nt-authorityiusr.html]
1. Open SQL Server Management Studio.
2. On the left menu, expand Security then Logins. Check if 'NT AUTHORITY\IUSR' exists. If not then that is the cause of the problem.
3. Right-click on Logins then click New Login...
4. On the General page, click Search...
5. On the next popup window, click Advanced...
6. Then on the following window, click Find Now and find IUSR on the Search Results. Then click OK.
7. Back on the left menu, you'll now see the 'NT AUTHORITY\IUSR' user. Right click on it and click Properties.
8. On the Server Roles page, check on sysadmin.
9. Then on the User Mapping page check on the database name you need access to; and below that on the database role membership make sure to also check on db_owner then click OK.
[Marks further edit/notes]
When I transited to IIS7/Silverlight4/Visual Studio 2010 I kept coming up with this error.
It turns out that the application pool is set incorrectly during the installation, or at least, read the following as my method of getting around this error. I haven't determined the security implications or if there is any detrement in efficiency, but it worked for me...
In IIS7, click on the Application Pools and select 'ASP.NET v4.0'
Click on 'Advanced Settings' in the right hand pane
Find the field 'Process Model | Identity ' (By default the identity set is 'ApplicationPoolIdentity')
Click on the button [...] to change the identity
Select 'Built-in Account'
In the drop-down, change the identity from 'ApplicationPoolIdentity' to 'NetworkService'
Click OK a couple of times to save the identity.
Next, in the SQL Management Studio, select your database, expand the tree and select Security, then users.
You need to add the Network Service as a valid user, so either right click, add user or select the user if already created. I will assume here you are creating a user.
In 'User Name' type 'NETWORK SERVICE'
In 'Login Name' select the 'NETWORK SERVICE' user, (NT AUTHORITY\NETWORK SERVICE)
Default Schema: dbo
In the Database Role Membership, select 'db_owner'.
Save your changes and run your application.
With luck, you will be able to run your application now!










