Configure 2 sites in the IIS of windows Server 2016 - asp.net

I have to configure a staging site of my web application in Windows Server 2016.
I have ASP.net site which is running smoothly in my win server 2016, and I have configured A record from my bluehost DNS Manager.
My Question: I want to add a new site in the IIS of my server using same port. So how I could manage to reach it from A record or CNAME record from bluehost?

As far as I know, IIS doesn’t allow two websites to use the same port number when we using the same alias for the local machine.
To create a unique binding, we need to specify another name(HostName) for the second website. Edit the binding and specify the unique hostname the user will address to.
Now, we can start the second website as well.
All we have to do is to add an alias for the server(A or CNAME) to DNS that specifies the IP address or the name of your web server.
Here is a related discussion.
http://woshub.com/run-multiple-websites-on-the-same-port-and-ip-address-on-iis/
Feel free to let me know if there is anything I can help with.

Related

How necessary is DNS Server to run an ASP.NET web app on IIS?

Assuming a Windows Server 2012 VPS:
It seems that many tutorials include the setting up of DNS Server (setup of forward lookup zones, and A record) as part of the basic steps to deploy and run an ASP.NET web application on IIS.
I'm slightly confused, because within IIS manager you can set the bindings ( IP address, URL, SSL, port) of a web application. Wouldn't this alone not suffice to correctly route incoming requests to the correct web application?
What would be the advantage to running DNS Server?
IIS Manager can only manage IIS related Windows settings, but to make a site work you need much more settings than that.
DNS settings are critical to direct web browsers to your side. Nobody uses IP addresses to access a site, so a typical URL uses domain name. That requires DNS to translate the domain name to an IP address so that browsers can send HTTP packets to the proper location.
IIS Manager could not manage that for you, as which DNS product to use or how to configure it is usually vendor specific and out of IIS's scope.

Hosting Multiple Sites through LAN in ASP.NET IIS 7

We have a few services running on our internal server, named cpweb2.
The Default Web Site is accessed locally by browsing to http://cpweb2/.
To enable browsing to other applications, the other sites are assigned a different port number.
For example:
CapacityTracker is configured to use port 8081: http://cpweb2:8081/
AcpWcfTool is configured to use port 8093: http://cpweb2:8093/
ProductionScoreboard is configured to use port 8082: http://cpweb2:8082/
ShopServices is configured to use port 8095: http://cpweb2:8095/
As you can imagine, not many people simply remember the web address for these sites.
I am currently creating a new service called AcpMainframe. I would like to give it a more user friendly URL like http://cpweb2/mainframe or http://mainframe.cpweb2/, but I don't know how exactly to do that if Default Web Site is not one of my projects.
I guess this question is two parts.
Can I get my new AcpMainframe service added to the root level Default Web Site if I do not have the code for that root level website?
If so, how do I go about that?
If you can use other hostnames in addition to the one you have, you can set bindings in IIS that will allow multiple sites to run on port 80. Examples can be found here.

Asp.net Intranet Application in local Networks with out IP

I developed an asp.net (2.0) intranet Application for local network in an organisation..
so we have 10 systems every one should access that site by ://192.xxx.x.xx/xyz(website name) ...
so now their requirement is not to type total ip adress.they need just by typing ://xyz they have to browse the intranet application..how to solve this issue..?
Thanks
Veduru
Go to every one of this 10 computers, and in this directory
c:\WINDOWS\system32\drivers\etc\
find the host file and add the conversion of ip to name as
192.168.1.10 xyz
etc
and then you can access the site as http://xyz
Talk to your network admin about setting up a DNS entry for your application in the local DNS server. If you have multiple web sites running on your web server, look into configuring IIS host headers to ensure the users get directed to the proper web application.
Please do not manually edit the hosts file on each machine unless it is absolutely, positively necessary, and only do so as a last resort. When your 10-machine application expands to 100, or if your server IP ever changes, you will thank me later :)

How can we configure IIS for domain name mapping

I would like to configure IIS server at (Windows server 2003) for domain name mapping.
We have purchased domain name for one of our newly created website.
I would like to know how can I configure IIS so that anybody from outside world can reach website by typing URL.
As in: http://example.com/ should redirect to my the home page of my website.
I have made website in using ASP.NET and Oracle.
How can I do this?
You need to register your domain on a DNS server, which is different (though could be the same physical box) as your IIS server. Long time since I've done this myself, as I use a hosting company for this kind of thing, but you will typically need at least two DNS Server IP addresses typically for a domain (primary and secondary DNS servers). There is a DNS Server for the windows server platform, but most people use hosting services to do this thing.
By the way, you might get a better response posting this kind of question on serverfault.com, as it's not really a developer question.

Getting site running in IIS 7 Issues

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

Resources