Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a self hosted webapi service in a Windows Service. This means that if I want this service accessed from the outside world, I will need to implement port forwarding.

The problem I am having is the following:

I can access this service, when the windows service is running it, from a browser I can use my computer name, My computers IP address 192.168...., but if I try the port forwarding provided by our router I get the proverbial connection actively refused error. I believe the port forwarding is set up correctly and that this refusal is caused by the Web Api service and way it does not handle the port forwarding.
Posted
Comments
ZurdoDev 27-Apr-15 15:14pm    
We don't have enough info to help you. However, if you have a service that listens on port 80, for example, because it's setup in IIS, then it doesn't know anything about the port forwarding. It doesn't care how it get to port 80, just as long as it gets there. So, my guess is, something with the port forwarding is causing the issue.
Member 11193287 27-Apr-15 15:30pm    
This service is using a self hosted web api service that is started up when the windows service is started. Is there any other info I can give you that will help.

1 solution

In the first case you are accessing your service with IP only, but when you use port forwarding you are also use a port number - probably one that is not open...
Go and check you port forwarding from outside and the inside:
Outside: http://canyouseeme.org/[^]
Inside:: TCPView[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900