How can we configure IIS for domain name mapping - asp.net

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.

Related

Configure 2 sites in the IIS of windows Server 2016

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.

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.

Configure Shared Website Hosting for IIS

I have a server that running IIS7 and DNS server.
I have 2 domains:
www.mydomain1.com
www.mydomain2.com
I want to visitors from internet coming without port of this sites. What may i do for this?
If I understand your question correctly, you need to set up two separate websites within IIS, and configure the bindings on each site - select the Bindings option and specify the correct hostname, for each site.
Note - this will only work for HTTP sites; if you want to route HTTPS to each site, they'll each need a unique IP address as you cannot setup hostname bindings for secure sites.

Website accessible from everywhere except for client's network

My client has a website that is showing some strange behavior. The site is built in ASP.Net and used to be hosted on their internal network. It's now been moved to a different server outside their network. They have other sites hosted on the same server, some built using DotNetNuke, and some classic ASP. All these sites are hosted on one application server, with a database (SQL Server 2008) on a separate server (which is on the same network as the application server). They share the application server, and the database server.
Now that this site has been moved to the outside server, they can't access it. I can, and so can others that I work with (from different IPs, across the country). But the client can't from their network. They can access the landing page subsite.clientdomain.com (no db access), but nothing else. So, for instance, there's a link to subsite.clientdomain.com/folder. When they click that link, the URL changes to subsite.com/folder, which does not work. For myself and others not at the client site, the URL does not change and opens with no problems.
I didn't write the site, and didn't even know it existed before this problem cropped up, so I know very little more than this. Any help is appreciated.
I'm going to go with Martijn B's answer. There's a DNS issue on the internal network. Somewhere on of the DNS servers is a definition that maps http://companywebsite to an ip address like 192.168.1.20 or whatever.
I would open a command prompt on your PC and type
ping new_website_name.com
Take a look at the IP address that comes back. You can also do an nslookup on new_website_name.com that will give you more information. If you (person A) gets one IP address and Person B (inside the network) gets a different IP address....there is definitely a DNS issue on the internal network.
You're going to have to do some network tracing to determine exactly where any redirection is occurring. Given that the problem is only manifested in certain locations, it is likely that it is a function of network configuration in that location (as previously suggested). Without understanding exactly what redirection is occurring, it would be unwise to make configuration changes that might make the problem worse or introduce new issues.
A DNS server cannot AFAIK redirect to a different URL. So something is redirecting from subsite.clientdomain.com/folder to subsite.com/folder, which could be caused by a HTTP redirect. This can be triggered by the software/website itself or by IIS.

DNS and Subdomain IIS

I have 2 web apps installed on my IIS, one running as app1.mydomain and other one as app2.mydomain
In the test environment I just copied about two entries pointed to 127.0.0.1
What changes do I have to do in order to put this on production server, I mean on DNS level?
Can I use URL re-write on IIS to avoid changes for DNS?
Thanks
You need to add A or CNAME records mapping both subdomains to the external IP address of your server.
This tells web browsers to go to your server when you go to the subdomain; URL rewriting has nothing to do with this.

Resources