You can communicate with your local machine from outside the LAN by Port Forwarding Technique of which will enable translating inbound communication to the proper IP device within the LAN.
To acheive Port Forwarding you'll need to go through the following setups:
A- Application Level:
1- Hardcode the Port Number: Port Number must be identified to the TCP Communication Class in your application. This is the Port Number buffers will keep listening to. This applies on Generic Communications like, Modbus. If it's a normal Web Application interaction then SKIP this step.
B- Local Machine Level:
1- Set up its LAN Communication Data: (IP address (ie 192.168.1.70), Subnet Mask (ie 255.255.255.0), Router Gateway (ie. 192.168.1.1 or 192.168.1.254, check with Router's Manufacturer's Data).
C- Router Level:
1- Set up Static/Dedicated Local IP: The IP address (of previous step B-1) must be set as Static Local IP within the Router's Dedicated IP List. This will prevent DHCP from assigning a different IP to your local machine from time to time of which will cause failure of communication. If your local machine is other than a PC/Laptop then you'll need to save its MAC number as well.
2- Set up Port Forwarding: Under Advanced Routing Tap of your Router interface, Set up a Port Forwarding Step. Following Data will be needed/determined/identified to the Router:
- Communication Protocol: Whether TCP or UDP. (In your case it's TCP).
- Port Range: Because you're working in ASP.NET App, your port shall be considered as WebServer Port 80. So, the Port Range is 80-80. This Port all exterior devices will talk to. And this is port of which your Router will listen for inbound communications that are meant to be for your local machine.
However, if you employ Generic Devices port number is different. ie. Modbus works on Port 502, WebCams work on 37777 or 38888. etc. You'll need to confirm yourself.
- Port Translation Range: It's the Port that Router will switch the inbound communication to within the LAN, again, in your case it's Port 80 ... so Port Translation Range is 80-80.
- Public IP Address: That's the IP Address of your Router the exterior world will talk to. It shall be provided by your ISP.
- List of exterior IP Addresses that are permitted to talk to your LAN: If you are permitting any inbound coming from any exterior source set it as 0.0.0.0 Orelse, create the list of authorized Public IP's that can talk to your LAN from outside.
- There are other data like Trigger Protocol or Trigger Ports. You will not need to tweak anything in it.
Good Luck,,,