ASP MVC 4 and WebService

2

I have a WebService with all the methods I need to make the system work, and I also have a ASP NET MVC 4 page. I have already made the reference in the services references of the WebService. I am trying to use a webservice method which returns a single string, but when I call a WebService method that requests the database (insert) it returns an error: System.Data.EntityException: O provedor subjacente falhou em Open. ---> System.Data.SqlClient.SqlException: Falha de logon do usuário 'IIS APPPOOL\ApPizza'.\n em System.Data.SqlClient.SqlInternalConnection.OnE... . I researched and found something like this: it is not doing the impersonate of the IIS user.

I wanted to know if there are any settings that I should make. Both in Web.Config and in the whole project.

    
asked by anonymous 10.04.2014 / 02:22

1 answer

1
  • Enter SQL Server Management Studio;
  • Log in to your server;
  • Go to the Security folder > Logons ;
  • Right button > New Logon ;
  • In Login Name, click Search ;
  • Type IIS APPPOOL\ApPizza and click Ok ;
  • Click Mapeamentos de Usuário and set the base permissions;
  • Click Ok
10.04.2014 / 02:27