Connect Local Host from Web Service - webserver

I have a Laptop, with msSql sever 2005, and it is connected to my Wifi router which gets the internet. So My laptop get connected to internet. But I need to access my msSql Sever from internet to connect my webpage which I made using ASP.Net.
Please Help me... And please give a solution for this...

You'll need your IP adress to connect, then open the SQL-Port in your router. (default is 3306)
When you connect to the server just use your current ip adress.
Maybe you want a static ip or something like http://dyndns.org

you want to write web service and host that service in sql machine

First setup a static IP address on your laptop and after that you need to set up port forwarding in your router. This process differs slightly depending on your routers manufacturer and model.
After this is set up properly make sure that SQL Servers port is open on your laptops firewall.
By using Dynamic DNS you can point to your possibly changing IP address with static name so you don't have to change this constantly in your connection string.

Related

How to connect a small web server program to a web browser which is running in another device in the internet?

I had made a small web server program that can handle HTTP requests, it worked fine on loopback ip address. I Had connected the host computer to a wifi using a router, i can access that program using another device connected to the same router using a web browser. but the problem is when i tried to open the open the command from the device connected to another router/internet, it didnt connect.
I had used the address like "10.0.0.4:8080" to connect with the device on the same router. later i tried with the public IP address to connect to my web server program but it didnt work!
what am i missing in giving the correct ip address and port number such that it could be connected with the devices that arent connected with my router.
You have to add port forwarding on the router from outside to the specific IP of the device. Then use public IP from outside and public or private from LAN. Probably also set it to static internal IP from device or router.
DMZ to the device is also an option but is overkill.
That way lot of bots will scan your server so carefull with the security and what you expose.

Letting remote desktops access localhost's web service

I can access my computer's (localhost) web service using eclipse mars and jax-ws. However, I'm just curious, how can I make it so that other remote computers that is not connected by LAN?
Any advice, direction, or what I should research is welcomed.
Your computer is invisible to internet. It will connect to internet
via a router (ADLS modern for en example).
Your router is visible on Internet and with a public IP Address, you
can try some website to see what its address is (for example
http://whatismyipaddress.com/)
You need to config your router to make it forward the request from internet
to you computer LAN address and your web-service port, the way to
config port forwarding is depend on your router.

How does a client socket application identify the server application on the same host computer

I have been trying to learn socket programming in C++ and got some progress for the basics. But I understood that basics are not fundamentals.
One of those fundamentals is about the question which is stated in the title. Lets say I have two separate applications running on the same computer. One of them has a server socket and the other one has a client.
When the server gets an IP address automatically, how can client find the server? Do I have to assign an IP address that is known by the client? In that case, maybe that IP address is not available on the network.
Or can client find and connect to the server by sone kind of name or id?
Have the server bind to all interfaces and have the client lookup 'localhost' by name; it's resolved locally, (ie. no external DNS service required), to an IP address stored in a 'hosts' file, and is set by default to 127.0.0.1
Google 'hosts file'
The IP address of any server in the same host is 127.0.0.1 unless the server has bound to a specific, different IP address. As #MartinJames points out, you can use 'localhost' as the hostname for that, except on certain broken Linux distributions.

Connecting to Local Web Server when I am Outside my LAN

I have a web server running out of my home. I have assigned it an address such as 192.168.1.123 on port 80.
I understand that this is running on my local network. If I go to another computer on my network and type in the server's ip address, I can see the server.
Is there a way to access this server from outside my LAN?
Yes, you need to set your router to forward connections to port 80 to your internal IP address (192.168.1.123). Look for Port Forwarding on your router admin screen which I would imagine you access by going to http://192.168.1.1
Keep in mind that your ISP may block port 80 completely in which case you can run your web server on a different port (for example por 8180) and have your router forward connections to port 8180 to your internal IP.
To access your server from outside, you just need to point your browser to your external IP address which you can find out by going to http://www.ipchicken.com
Assuming you have a connection to the internet:
https://github.com/progrium/localtunnel
is a quick way to access your local server from the internet. There might be similar implementations in other languages/platforms. This is just the one I know about.
Remember that security issues need to be carefully considered when opening your local network to the world.
If you use a PHP Webserver you can set it this way:
php -S <YourIPAdresse>:<SomePortNumber> <StartPHPpage>
Example: „php -S 192.168.1.123:9000 index.php"

Mobile App Connecting to my local web server

Looking for assistance on why I can access my local web server when I'm on my wireless network but not from my mobile phone (when not connected to wifi). I have tried using dyndns, wan ip, regular ip address but I can't see to grasp what I should be doing. I have my MAMP server running and php on 8888 for which the appropriate php file runs successfully when I'm logged into my network. I'm just trying to access this now from the public domain and I'm not sure what i need to do.
Any help would be greatly appreciated!!
Thanks,
Dan
You need to get your router to forward the external requests to the correct internal computer & port.
I.e. any external requests to port 8888 should be forwarded to your computer's IP address on port 8888. Most routers will have this option in the admin panel somewhere.
[EDIT]
This website might be able to help - http://portforward.com/english/routers/port_forwarding/routerindex.htm