Hi my fried,
Can not access local sql server from IIS get error net::ERR_CONNECTION_REFUSED
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
2 answers
Sort by: Most helpful
-
-
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.