Click here to Skip to main content
14,116,173 members
Rate this:
Please Sign up or sign in to vote.
After deploying my ASP.Net 4.5 application under IIS and browse my application the URL is in format: IP:Port.

How to give it a name?

For example the url now is:

And I want it to be:


The Idea is I don't want to show the IP, I want to give the user a name instead of IP.
Updated 20-Oct-13 21:24pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Apparently, you cannot do it in your application itself. Just think about it. And it it totally irrelevant to any names you may have to "assign" to your application. Please see:[^],[^].

contracting1990 wrote:
For intranet I don't need a domain...
Please see my comment below.

Please read the answers to this question:[^].

You can choose what to use for DNS in your network consulting this list:[^].

contracting1990 21-Oct-13 3:39am
So no other way to show name instead of ID:Port?
Sergey Alexandrovich Kryukov 21-Oct-13 10:23am
It's now "show". The user types the URL in the address bar, and anchors use it. Normally, people buy domain names, pay the annual fee, and the owner of the hosting add data to DNS server data, and then it is propagated...
contracting1990 21-Oct-13 10:26am
For intranet I don't need a domain...
Sergey Alexandrovich Kryukov 21-Oct-13 10:35am
Great. Then you need your own, internal, Intranet DNS...
Just think about it: a Web site cannot define its own URL, because — how another side would "know" about it?
contracting1990 22-Oct-13 1:31am
Good point
Thank you. Will you accept the answer formally then?
contracting1990 22-Oct-13 2:12am
ok. you too can you up-vote my question?
Not sure that it was interesting enough, and you could easily find what to read in Web addressing.
Please understand: we don't exchange favors when we vote, normally, we directly express our opinions, which is not considered as mandatory...
I must note that your acceptance of the question turned out cheap... That's funny. :-)
contracting1990 22-Oct-13 2:55am
I didn't like your answer but you broke our mutual agreement
Please don't lie to me: no "mutual agreements"! This is nasty.
Have a nice day.
contracting1990 22-Oct-13 3:19am
You started by asking me to accept your answer, why you do that if you don't want to do the same to me?
BECAUSE THIS IS NOT A FLEE MARKET, and voted is not money. I asked your to accept my answer because this is a real answer. You are not obliged to accept it. If you did it expecting for the favor, No one does any favor to anyone. Your question is really bad. This is my opinion, and that's enough. Please stop it.

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you have deployed your application with the name for example "MyApplication"

Than it can be accessed through

it will check for the default.aspx automatically in the application and will redirect to it.



Kindly have a look on this article, I hope it will be helpful as per your requirements.
contracting1990 21-Oct-13 3:13am
I don't want to show the IP, I want to give the user a name instead of IP.
VICK 21-Oct-13 4:32am
Than get some domain or get SSL certificate to redirect like

contracting1990 21-Oct-13 5:09am
I want to do it on local network to be used as intranet
VICK 21-Oct-13 5:15am
Solution Edited.. Kindly check the link.
contracting1990 21-Oct-13 6:27am
Thanks it works. My 5
VICK 21-Oct-13 6:35am
Glad to help you.

But I think now you should upvote this solution too.. :D
contracting1990 21-Oct-13 7:39am
I did I gave you a 5 on it. I don't know who down voted you the 1 ???
VICK 21-Oct-13 8:36am
Thanks Contracting1990...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

This is one of the possible solution. Edit a host file which is located in C:\Windows\System32\drivers\etc (win 7). Make an entry in this file as example

save the file. Hope it works as I have not tried it myself before. I am not sure if the port number is supported.
contracting1990 21-Oct-13 3:20am
But this I have to do it on every machine. not a good idea when its a web application
bbirajdar 21-Oct-13 5:22am
Buy a domain name..It costs only about 10 USD..or the cost of a keyboard of one of the computer in your organisation...
contracting1990 21-Oct-13 6:29am
Thanks for hint but I was aiming for intranet so don't need a domain. solution 1 works fine after Edit.
ArunRajendra 21-Oct-13 6:57am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190518.1 | Last Updated 21 Oct 2013
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100