Hi everyone,
I have configured my web application using IIS7. It is running fine for http:// localhost/, but I need to give some website name like http://myexamsystem.com/
instead of "localhost".
I have tried all the possible ways from IIS7, but I am not getting the result.
Steps I did upto now:
Step 1: Right Click on "Sites".
Step 2: Selected "Add Website" option.
Step3:In "Add web site" dialog box:
Site Name:"myexamsystem", Application Pool: "DefaultAppPool"
Physical path: "desktop\myproject folder"
Binding
Type:HTTP, Ip address "All Unassigned", Port:80
Host Name: "myexamsystem.com"
OK
Error Messege:
This page can't be displayed
•Make sure the web address http://myexamsystem.com/ is correct.`
If this is just for debugging / local development, then you'll need to add an entry in your HOSTS files. This is located:
c:\windows\system32\drivers\etc\hosts
It can be edited in notepad (if you have administrator rights on your machine). You just add the following entry:
127.0.0.1 myexamsystem.com
Note that this will only work locally. If you want it public, then you'll need to buy the domain name and point it to an external IP address.
Update
Just seen your comment about it needing to run on your local network. A quick way is to add your internal network IP address to each machine's HOSTS files. You can find out your internal IP address by typing ipconfig into the command prompt. Then add it to the HOST file of the other machines in the same way as I descibed above, except use your internal IP in their HOST file rather than 127.0.0.1.
If you don't want to manually add them to each computer, then as far as I know, you'll need a DNS server.
Related
i am trying to publish my website in IIS but when i try to ping the domain name it will give this instead of local host
This how i created the site
datingapp.com domain is mapped to IP 72.52.4.119 which you can confirm using this link
If you want to point datingapp.com domain to your localhost, you need to add an entry in host file which can be found at C:\Windows\System32\drivers\etc on Windows operation system.
Open host file using any text editor in administrator mode and add the following:
127.0.0.1 datingapp.com
On server: I go to start -> run and type "drivers" change to the etc directory you want to edit the hosts file.My website was seen when i go from iis(from the server) Right click websitename>Manage website>Browse.
On local computer: (This computer can access the server)I open browser>type the hostname on url , i can't view the website. How to resolve this?
Please check the following:
Under IIS (inetmgr), is application binded with any IP?
If answer to #1 is YES, use that IP in your host file. If NO, you can
either use user machine IP or localhost (i.e. 127.0.0.1).
Thank you
I have a deployed web application on my local IIS (7.0) and is working perfectly. Since it's on my local, it is accessible via http://<>/webapp/index.aspx. Now, what I am trying to achieve is to access it on a custom url i.e. http://www.someuniqueweburl.com, and will make sure that it doesn't exist on the internet and of course, can only be accessed when you are on the same network with the local IIS web server. Is this achievable?
Thanks a bunch!
You need some kind of DNS service to achieve this.
You may :
register a DNS entry in your local network DNS Server, if you have one. Then all your network should be able to sample.custom.url.com to your IP address
or add an entry line to your %windir%\System32\drivers\etc\hosts file :
127.0.0.1 sample.custom.url.com
but you will be the only one able to resolve sample.custom.url.com . Other machines will need a similar entry in their hosts file (with your network ip address, instead of 127.0.0.1)
Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).
In the Connections pane, expand the Sites node in the tree, and then select the site for which you want to configure a host header.
In the Actions pane, click Bindings.
In the Site Bindings dialog box, select the binding for which you want to add a host header and then click Edit or click Add to add a new binding with a host header.
In the Host name box, type a host header for the site, such as www.contoso.com.
Click OK.
To add an additional host header, create a new binding with the same IP address and port, and the new host header. Repeat for each host header that you want to use this IP address and port.
I got this from the Microsoft technet website: Configure a Host Header for a Web Site (IIS 7)
Using ASP.Net I did a web site and can load it up in a browser window when pressing the F5 key in VS2010.
On the browser window I noticed VS2010 used an address like this to load the web site home page:
localhost:12345/
If I try to use the ip address for my computer found by using ipconfig to load up the home page,
1.2.3.4:12345
I get an error stating:
Could not connect to 1.2.3.4:12345
If I use:
1.2.3.4
I get the IIS7 default page.
The actual address and port numbers I used in this example are different than those I really used.
Can you tell me why localhost works but 1.2.3.4 does not work?
Can you tell me if I need to do something extra with IIS7 since I never did this before?
A couple of things to remeber. Your computer two types of IP address. The first is a private IP address and the second is a public IP adress. IPConfig will show you your local, private address. Your private address will not be accessible from anywhere outside your LAN.
If you would like to change your websites URL locally from localhost, you need to change your IDE's development settings.
This site has a great tutorial on how to do that.
First things first, the address Visual Studio gives you is a temporal address that corresponds to their development server (Webdev.Webhost or Cassini), this server doesn't allow you to connect outside your computer, that's why localhost:1234 opens your page, but 5.6.7.8:1234 doesn't.
Second, also you seem to have IIS configured, but what you need to do is deploy your site to IIS, here are Microsoft information about deploying your site: http://msdn.microsoft.com/en-us/library/20yh9f1b(v=vs.100).aspx, once deployed, you may create an Application on IIS or a Virtual Directory, for more information you can take a look here: http://technet.microsoft.com/en-us/library/cc772042(v=ws.10).aspx.
Once you have deployed and configured your application or virtual directory, you can access your site like this: localhost/MyVirtualDirectory (assuming you set a virtual directory).
This is driving me nuts. I am trying to setup a webiste on our dev server with a specific url name www.mystpidsite.com as an example. mystupidsite is not the same name as the dev server.
1) specify a specific url to use for the website I create in IIS
2) run it and use that url to access it
I have:
1) created a new site in IIS 7 in Server 2008
2) attempted to access it via the site name which I set to the desired url and port 8888. So if we want it to be www.mystupidsite.com I setup the website name to mystupidsite in IIS 7.
3) I even tried to create an application under mystupidsite with the same name in IIS 7.
The server is definitely accessible and pingable on the network from my local PC, we have other stuff installed on this new server. Do I need to create an application or is just creating the website enough in IIS 7? I specified the IP as the server's IP in the website I made.
For the host name in the bindings of the site I put www.mystupidsite.com
when I try to access the site via www.mystupidsite.com it can't find it and the site in IIS7 on the dev server is running. It's running on a HyperV instance which is our dev server. Everything else has worked just fine. I just wnat to understand how to get a specific url by name setup.
Do I need to add something in the hosts file on the server or something?
You're not going to be able to have a site on your dev box answer to both the mystpidsite.com and mystupidsite.com domain names.
Unless you have the domains registered and have your domain's nameserver directing that name to your dev machine, IIS is only going to answer to requests either the machine name on the network or the IP address of your machine (in addition to 127.0.0.1 and localhost).
The only thing you're going to be able to do outside that scenario is set up two sites on two different ports on your machine and access them from http://localhost:80 and http://localhost:8888 (or network computer name equivalent).
you need to have an entry in dns to be able to hit the server when using www.mystupidsite.com
Because you have the site running on an alternate port you should be able to get to it by http://your-server-IP-address:8888
If you want to test it locally using the host name and do not have access to dns you can add the appropriate entries to the hosts file on your local machine (c:\windows\system 32\drivers\etc\hosts)
What happens when you type 'nslookup www.mystupidsite.com'? Do you get the IP address of the virtual server?
Do you have the windows firewall enabled on the server? if so, did you add an exception for port 8888?
add a default binding (no host header / blank) and try accessing it by IP