0
votes

I have an ASP NET App that hosts a WCF Data Service which allows access to an Entity Data Model built from a database.

I already configured SQL Serer 2012 Express to accept remote connections, added a login NT AUTHORITY\Servicio de red (Network Service) with default schema as dbo, granted permission to this Servicio de red to select, insert, update, delete to the tables I'm trying to access from an application.

Configured the service to use verbose errors, and this is what I got when trying to run an aspplication that uses the Data Service:

enter image description here

Basically, it says that the login failed for IIS APPPOOL\DefaultAppPool.

What else do I have to do?

1
You can copy the image and paste it in Paint in order to read itRafael
Please check connection string that the WCF Data Service is using to access the database. You should grant access to appropriate user mentioned in connection string credentials. If You are using Integrated Security setting, you can grant access to user that application pool is using. The error suggests that You use the Integration Security, but haven't granted rights to the database to the App pool user. In case of integration security I would rather recommend creating a dedicated user in the database and specify his credentials in conneciton string.Lukasz M
Yes, Integrated Security is true in the connection string. How do I grant access to IIS APPPOOL\DefaultAppPool?Rafael
I don't know if this is a good solution in Your case, but maybe it's ok to create a new user in the SQL database and then use his credentials in the connection string. If You, however, still want to grant access to user that application pool is running on, You may want to change that user to another user in IIS configuration) and configure it to grant access to SQL database (in DB configuration). Take a look at this link for more information: social.msdn.microsoft.com/Forums/en-US/…Lukasz M
But if You would still like to use default application pool, You can use SQL Server Management Studio to grant appropriate permissions to this user account.Lukasz M

1 Answers

0
votes

I solved it using NetworkService in IIS for DefaultAppPool