i am trying to deploy ASP.NET CORE API Version 3.1 to local IIS Hostiing but can not connect to SQL Server

90 Views Asked by At

I have deployed asp .net core api app on local IIS Manger when i call action that need to retrieve data from sql database does not work,i opned C:\inetpub\logs\LogFiles\W3SVC3 found 404 not found error , i found another error in my log as Login failed for user 'IIS APPPOOL\service' , but when i call another action that returns local data it works fine here is my connection string

"ConnectionStrings": {

    "ERPConnection": "server=.; user Id=ssa;password=12345678;database=dbname;trusted_connection=true;MultipleActiveResultSets=true"
},

and my application pool is not manged code : enter image description here

1

There are 1 best solutions below

3
Connor Willoughby On

Where is your SQL Server instance hosted? If its localhost try using the full local host domain name.