Can not access local sql server from IIS get error net::ERR_CONNECTION_REFUSED

Terry Arnett 1 Reputation point
2022-11-27T21:13:27.74+00:00

When running app from Visual Studio 2022, it works fine (connection to sql server). App is an Angular app with a ASP.NET Web API backend.
After running "ng build" and moving distribution files to the server, I can't run the app through the browser.

Extended error from browser:
L
error
:
ProgressEvent {isTrusted: true, lengthComputable: false, loaded: 0, total: 0, type: 'error', …}
headers
:
ue {normalizedNames: Map(0), lazyUpdate: null, headers: Map(0)}
message
:
"Http failure response for https://localhost:40443/api/employees: 0 Unknown Error"
name
:
"HttpErrorResponse"
ok
:
false
status
:
0
statusText
:
"Unknown Error"
url
:
"https://localhost:40443/api/employees"

Any help?

Community Center Not monitored
{count} votes

2 answers

Sort by: Most helpful
  1. Gabriel Dispemec 431 Reputation points
    2022-11-28T11:20:14.667+00:00
    0 comments No comments

  2. Terry Arnett 1 Reputation point
    2022-11-28T13:30:05.993+00:00

    I appreciate the response, but it had nothing to do with my original question.

    When running my app from the browser, it will not connect to the database (sql server) from IIS. It works very well from within Visual Studio 2022.

    I get the net::ERR_CONNECTION_REFUSED error message when it tries to connect to the database.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.