IIS Adding URL instead of IP - asp.net

I have a local only ASP.NET MVC app hosted in IIS, and I was wondering how I could use a URL instead of an IP? At the moment I access it using http://127.0.0.1, but I'd like something like http://foo instead

In IIS, you need to add a binding to the website, here you can specify the hostname i.e. foo.xyz.com
However, you will need to make sure that the DNS resolves that hostname to your IP address

You could add this line to your host file:
127.0.0.1 foo
You can find the host file here:
C:\Windows\System32\drivers\etc

Related

I want to access Zammand (which runs on nginx) from the mobile app but i get the standard "welcome to nginx"?

Like the title says it, I need to configure my server to that it is reachable via the IP. I'm just asking where i can redirect/reroute it in the config?
Thanks
So i found out that in the nginx config you have to add an ip and an DNS Entry and it works :)

Can't access IIS domain name

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

How to make domain name to point different port not 80 in IIS?

I have a domain just bought. Say it is: myowndomain.com. I have added A record with my SERVER IP address. We have two applications on our server. One is with port 3000 and other is with port 3001.
Now I would like to access my applications through this domain. It is working now when I call it by myowndomain.com:3000 and myowndomain.com:3001.
How to setup the system to load port 3000's application if I call myowndomain.com and load 3001's application if I call my.myowndomain.com. [subdomain my.myowndomain.com is also added in godaddy]
Simple. I just have to add domain name alias in HTTP binding and save.
I think you need to do this by using URL Rewriting.
Please have a look on below link from iis, here is given complete demo how you can do this:
https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module
you can install ur rewriting from here:
https://www.iis.net/downloads/microsoft/url-rewrite
by using this on your applications you can move individual pages also to a specific url. hopefully it will resolve your problem.

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.

How to give Alias name for My Website

I have deployed my ASP.Net Site in one of our server which is in ip format. So, I used to browse it like… http://xx.xx.xx.xx/MySite
But, I want to get out of this IP and give some text. How can I achieve this.
Also, I can’t change the Host alias name.
you can add name for ip address in file [windows directory]/system32/drivers/etc/hosts but it works only on local machine. If you want solution for network, you should have access to DNS server
Your server definitely has a name. You can use this name to access your site instead of ip address. smth like http://myserver/MySite
Thanks,
Arty

Resources