How to view a web page served from one computer from another computer - asp.net

I am running a website from IIS on one computer and I want to view the web page on another computer. the only way I can do this is by using the ipaddress of the computer with IIS on it but would rather have a url. How can I generate a url or use a domain name from dynamicdns.com. I signed up for an account on that website but dont know how to use it. I dont know how to configure it.

If the computers are in the same LAN you can substitute the computer's name for the IP. If you want the website to be visible outside the LAN, and accessible according to your dynamicdns.com name, you'll probably have to set up port forwarding on your router so that requests for port 80 are sent to the IP address of your IIS server.

edit your hosts file under Windows/system32/drivers/etc
add the ip and any hostname you want to use, e.g.
74.125.19.103 my.hostname.com

Related

Assign URL for IP Adress (IP adresses mapping to host names)

How can I change domain name for ip address (192.164.5.19) to www.anyname.com?
Current I made a website and published it by using iis7. It is in the intranet. Now I want to access the website by a domain name and not by ip address.
can anyone help me for with this problem.
Note: The web-server were use is normal PC not a server.
It is up to the administrator of the DNS authorative nameserver for the "anyname.com" domain.
Since this is an intranet application, this would likely be your companies IT department.
You can find out more information about that via a whois search, although for an intranet application it may not be much help. One example: domaintools link
Add the ip adress to the hosts file from the computers who needs to reach the website. E.g. u can do the edit with a batch file.
Path:
%SystemRoot%\system32\drivers\etc\hosts
add line: 192.164.5.19 www.anyname.com

Hosting multiple sites on IIS having same the IP address

I need to host multiple sites for testing on single server with one IP Address over IIS.
Currently i have hosted a website which is mapped directly to IP address means no domain name. i need to host another website on same IP. How can i achieve that? is this possible having
e.g 174.22.12.87 (Site1)
e.g 174.22.12.87 :800 (Site2)
I am confused what to put in Host Name and Site Name ? for single IP Address and to host multiple sites. If i put ip in host name in both websites that look fine but what to put in site names? i think they should be unique?
you can have a look at this link.
https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b77cf015-017f-489c-9b5b-65ca4a679392.mspx?mfr=true
If you have the same IP-Address, the port is used used to host multiply sites. So you are right.
The combination of IP, Port, and HostName must be unique.
If you're deciding to always leave HostName blank (referencing things by IP:Port instead of domain) then you still just need the combination of IP and Port to be unique. (i.e. 174.22.12.87:80 vs 174.22.12.87:800)
I believe you're using SiteName to mean the IIS site name, which is just what it shows as within IIS and doesn't impact how you access the site at all.
Don't forget to add new Inbound rule to open your specified port in Windows firewall (server side).

How to mask my local ip with an user friendly name?

I am developing a web application, I've made the project in my localhost, but the net users need to access to my project and I dont want to give them a non-friendly ip address, so I wanna user acces with a name for example
http://myproject/
If this is on a local network you can edit the hosts file on your computer to "mask" the ip on the network. Of course you'll have to change the project to use the network ip instead of localhost.
go to MyComputer>Drive C>Windows>System32>Drivers>etc>
Open hosts file
After opening the “hosts” file that will look as below. Here you can add your favourite domain name with the same IP address as I have added the ebaytemplate.com with the IP of 127.0.0.1.
now run you localhost and in browser type ebaytemplate.com you localhost will run :)

How to stop redirect to default website when IP address is entered in the address bar of the browser?

I have multiple websites hosted on our server. When someone types the IP address in the address bar of the Browser It redirects to one of the websites hosted on the server. Is there any way by which I can set the default website which is opened when some one types the IP address. Same IP address is being shared by multiple websites.
1 IP address can only bind to 1 IIS Entry. So what you need to do is to pick the IIS entry you want, go the "Binding" section and bind your IP as the binding header.
ex: If your IP is 1.1.1.1 , then in binding header, you put 1.1.1.1, in IP address, you also choose 1.1.1.1.
After you setup this binding, you can browse to 1.1.1.1 and it'll open your site.
Remember to make sure all other sites doesn't have this binding. Otherwise, it'll have an conflict.
All you have to do is leave off the IP address and host name entries, and provided you have only a single website matching that, that site will become the 'default', while your other sites will have specific host name(s) they respond to.
I am not sure, but you may have to add a specific host in the C:\\Windows\System32\drivers\etc\hosts file, giving IP address and its corresponding address, this definitely works from logging into the website where it is hosted, i.e on the hosting server.
For logging from different IP machines, try the same logic - in this case make sure that the gateway is same for LAN.
Let's see what happens in this case ??

Allow user from another PC to connect to my localhost website

I am running a website on localhost:portnumber on visual studio 2005, and want to allow another person to connect to it from another PC. Is this possible?
You can try following this article and see if it works
http://www.pluralsight-training.net/community/blogs/jimw/archive/2009/09/03/accessing-the-visual-studio-asp-net-development-server-from-iphone.aspx
Possible, yes.
You will need an ip address that is accessible from that other machine.
Your firewall will need to allow the appropriate port to be open (typically 80).
If you want them to use a DNS name, that DNS name must be pointed to your IP. And, again, it must be externally accessible.
Now, if the client is NOT on your local network, then the IP will have to be a public one that is routed to your machine. Depending on where you are (corporate, etc) there may be other firewalls in place to prevent this. In this case contact your local network admin.
Yes its possible for only for testing purposes first you need to install IIS and get dynamic DNS to allow user to connect to your computer (Using your Dynamic IP) Check No-IP , dyndns point this dynamic host to your IIS website, Bindings settings
Yes, it is possible. You need to do two things:
1) Open that "portnumber" for incoming connections through your windows firewall (and any other firewall you may be running).
2) Set up your router to allow incoming connections on that "portnumber" and route those connections to your local computer's IP Address.
That should do it. Be aware that doing this opens up your computer to be hacked if you are not careful.

Resources