Visual Studio 2022 Debugger accept requests from remote machine

38 views Asked by At

I am debugging my API app in vs2022 on my server.

I would like to access the api from a client machine just to see what gets into the Headers etc.

In the debugger I have it configured to listen on port 5020... and I can use postman to send a request to localhost:5020 (as long as postman is running on the same machine.)

However when I run postman on a different machine on the same network and point it at myserver:5020 then I just get a connection refused...

So, wondering if its possible to get the debugger to accept requests from a different machine?

Thanks

1

There are 1 answers

1
Vida On BEST ANSWER

Ahh haa... I got it.. feel like a bit of a dope now :)
Just posting this for anyone else who might face the same confusion:

I had the Debug properties set to

http://localhost:5020

and when I set it to

http://myservername:5020

then it worked from a remote machine.

So, changing from localhost to the actual name of the local server got things moving.