Access Website through LAN using Domain name - asp.net

I have created a website using Visual Studio 2010 Express and pasted it inside C:\intpub\wwwroot\ as it is. I have Windows7 home premium with iis7. Now inside IIS Manager I converted that directory into Application named newapp.
Now to access this application I am using http://localhost/newapp/ and on LAN I am using http://ipaddress/newapp/. It is working perfect.
I want to access this application without specifying the IP address each time.
How can I able to replace the IP address with some domain name to access the website? for ex, http://somename.com/newapp/.

note:please keep a backup copy of your existing host file before making any change
Open notepad or similar software as administrator then navigate to:
C:\Windows\System32\drivers\etc
and open the hosts file.
make entry for your ip addess as shown below
102.54.94.97 rhino.acme.com
now type in the mapped host name in your web browser

Related

How to Upload website over internet by using IIS and domain

Please Explain me step by Step, how to host a website over internet. by using iis server with help of domain
To host asp.net site in iis you could follow the below steps:
1)open the visual studio. Select your site and right-click on that-> Click publish.
2) in pick up publish target Select folder option and create choose destination where you want to publish the site. (make a new folder and publish a site in that folder) and then select publish.
3)open IIS manager(if not installed then installed it first).
4)expand the server name and right-click on sites and select add a new site.
5)enter the site name, physical path, and site binding details.
(Note: you need to have a public IP first, and bind the domain to the IP at where you purchased the domain name. after that, in IIS, bind IP and hostname as usual)
6) click ok.
if you have url rewrite rule and other external settings in your site you need to install that external module in iis.
for more detail please check the below link:
https://learn.microsoft.com/en-us/iis/install/installing-iis-7/installing-iis-7-and-above-on-windows-server-2008-or-windows-server-2008-r2

Can Access Website using IP address on a Network but Not Using Host Name

I am hosting a website on the intranet. I configured the hosts file in etc folder and added the following:-
10.XXX.42.67 GSOnlinePortal.com
In IIS7 i have added my website and this is how my Site Binding looks like:
Now when i access this website on the host machine using http://GSOnlineportal.com, it works just fine. But i cannot access it through a different (remote) computer on a network.
If i change my binding on the IIS to look like this:-
Now i can access this website both on the host machine and a remote machine on network using http://10.XXX.42.67/ without any problems.
What is want is to access the website on remote machine on a network using http://GSOnlinePortal.com. Please help. I am fairly new and have finally come close to achieving this. Will highly appreciate it. Thank you.
The local etc/hosts file is used to provide domain name resolution services to the local system. The remote system from which you are trying to open the website is unaware of this mapping and cannot resolve the name GSOnlinePortal.com to IP 10.XXX.42.67. Two solutions are available for your problem:
If you have a DNS server available in your network, you could register the name there. (Recommended)
You could add the mapping in the hosts file of every system you want to access the web site.

Accessing Website by FTP in visual studio 2012

I try to connect my website via ftp. I succeed connect the folders by my browser, but in visual studio 2012 I can connect the site just by the local address(10.100.101.100)and not by the remote address.
I get this error when I try to connect in remote address:
unable to retrieve folder information from the server. can't connect
to '(the remote ip address)' on port 21. Check the server name and
proxy settings. If the settengs are correct, the server may be
temporarily unavailable.
This question is six years old, but still someone might benefit from it. Once you open visual studio, in the start page, go to Open Website.
Then in the resulting dialog box select FTP Site.
In the fields, for "server" give the ip address of your website and not the name. for "Port", give 21. For the "directory", use the ip address and slash like this: "165.63.29.89/". And then use your username and password. You will have your website open and files listed.
Edit1:If it doesn't work, do the same thing but use only "/" for the directory. It will work.
Edit2: If the connection is still not established, do the same thing with "Passive mode" selected.
And check the Microsoft Documentation here

configure hostname for wordpress site using webmatrix

How can I configure a wordpress site built using webmatrix on windows to run on a specific hostname instead of localhost with a port number.
For example my site is currently running on http://localhost:64044/
I need to be able to view it via http://www.mydomain.co.uk
I know I can edit my hosts file in windows to point my domain to my local pc like so:
127.0.0.1 www.mydomain.co.uk
but I cant see how or where to configure hostname bindings for the wordpress site in webmatrix?
probably you can't do it directly from WebMatrix. But you can do it manually by editing IIS Express configuration file %userprofile%\documents\iisexpress\config\applicationhost.config (WebMatrix uses IIS Express web server). Take a look at following posts
Binding IIS Express to an IP Address
Is it possible to use custom host headers / bindings with IIS7 Express?

Publishing and Configuring ASP.NET site in internet

there!
I'm now publishing asp.net site on test server. I have added it in IIS ( v6.0). I have created for it alias like test.inventory.site.com. On it exists MS Windows Server 2003.
Also I have access to production server. For both servers I connect through Remote Desktop. And to prod. server I connect with address like inventory.site.com, to test server connection address is inventory.site.com:port. I need access through internet to my test site by it's name test.inventory.site.com. On production server exist several sites, therefore it doesn't work when I create alias for production server ip in my local hosts file.
How I can configure it?
You can edit your local dns server or on the development box edit the hosts file located in c:\windodws\system32\drivers\etc
You can change the IP address for the host names so that you can point them to your development or live.
The hosts file will just change the address for the site on your local computer.

Resources