Base solution for your next web application
Open Closed

Publication IIS Connection problem #5058


User avatar
0
dfielec created

Hello,

We have created a project using aspnetzero v5.3.0 Asp.Net Core & angular, all is working good in visual studio. But when we publish the project on IIS, we have always Error 500: Internal server error. We tried the project on debug mode in the server (Visual studio), it's working good. We tried to publish the project in Debug mode on IIS, and we find in the Logs.txt the following bug:

System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): Le chemin réseau n’a pas été trouvé

Sql Server is running and the connection string is working perfectly!!!!????

Please help Thank you


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @DFIELEC,

    Then I assume wrong connection string is used. Can you check other appsetting.*.json files in the root directory of your published app ?