0

I'm trying to create a Silverlight App hosted in IIS (Windows 7, VS 2010) but I get this error:

k

Here's what I did:

  • I created a Silverlight Application (Silverlioght 5)

  • I entered on the Silverlight.Web project properties and checked "Use Local IIS Web Server" (I leaved "Use IIS Express" and "Override Application root URL" unchecked)

  • I created an ADO .NET Entity Data Model for AdventureWorks SQL Server Express database

  • I created a Silverlight UserControl that simply has a datagrid created by dragging the Employee Entity Table (Data Sources) to the UserControl design surface (it created a DomainDataSource)

  • Followed "How to enable remote connections in SQL Server 2008" (http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx) :

  • But when I run the app, I get the specified error.

What could I be doing wrong?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Rafael
  • 2,413
  • 4
  • 32
  • 54

1 Answers1

0

Have you tried granting permissions to 'IIS APPPOOL\ASP.NET v4.0' to log in and access your database? It looks like you are probably using the default credentials for impersonation. You can also specify a custom identity on the Application Pool as well. http://www.iis.net/learn/manage/configuring-security/application-pool-identities

groksrc
  • 2,910
  • 1
  • 29
  • 29
  • How can I grant permissions to log in and access the AW database from IIS APPPOOL\ASP .NET 4.0? – Rafael Feb 01 '13 at 16:38
  • If the SQL Server is on the same machine you should be able to CREATE LOGIN [IIS APPPOOL\ASP.NET v4.0] FROM WINDOWS; http://msdn.microsoft.com/en-us/library/ms189751.aspx If not, you should use the application pool identity from the afformentioned link. – groksrc Feb 01 '13 at 18:09
  • SQL Server Express in on the same machine as the database. I entered the command as "CREATE LOGIN [IIS APPPOOL\ASP.NET v4.0]" and I received an error in SQL Server saying that the syntax is incorrect. – Rafael Feb 01 '13 at 19:28
  • Found a complete solution, for those interested please see: http://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0 – Rafael Feb 04 '13 at 15:02