No, you can't put a port value in the HOSTS file (or DNS). Why do you want to?
Main Topics
Browse All TopicsIs there a way to add a line like this to the host file:
127.0.0.1:3378 mysite
where the port number is used?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Right, the host port thing doesn't work. I'm currently running websites from VS.NET 2008 using cassini. I'd like to run them off of IIS (6.0) on XP. From VS.NET, the URL looks like this:
http://localhost:3378
when I want something like this
myownwebsite
I've setup a virutal folder in IIS but this still creates a url like this:
http://localhost/myownwebs
The goal is to have people with different machines always be able to access this url
http://myownwebsite
and it will point to whatever url they have mapped locally. Some examples are:
http://myownwebsite <- http://localhost:3378
http://myownwebsite <- http://dev.myownwebsite.co
Having myownwebsite in a config file keeps from having to know what the specific environment is doing with their webserver.
I could see what he would want to to it. Less typing. Lets face it we all "play" with things so see what we can get away with. Specifying an entire socket would 1) cut down on trying and 2) let him see if it could be done.
This was totally non-destructive and I give him Kudos for going for it. Nothing ventured nothing gained.
I'm coming from the server side, so I'm not 100% sure you have the same options on a local XP version, but...
If you can already get it to go to a virtual folder (http://localhost/myownweb
Why does it need the port number, if it's going to be IIS? If it's because 80 is used or blocked, and you absolutely have to use the different port, I don't think you're going to be able to hide it.
I can't do a redirection because that will modify the app. This is a local configuration issue that should go along with the app. The port number isn't needed anymore since I'm using IIS. I was just asking the question because I could never get it to work no matter what I tried.
So, to use a variable such as myownwebsite, which everyone will use, I need a mapping. This allows myownwebsite to point to the URL of the local machine no matter what that url looks like. BUT, I don't know how to encapsulate a URL into that variable.
If you are redirection from something like localhost/mysite, than that isn't a variable.
This looks promising http://andreineculau.wordp
The service did not response to start or control request in a timely fashion.
The first site starts fine. Any ideas?
One problem I'm having is that the IIS website isn't using integrated security to log into the database. I get a login failure for "username\ASP.NET". When I run the website from VS.NET, it doesn't have that issue. I'm not using anonymouse logons in IIS but it doesn't matter either way. I have a connection string in my web.config that says to use integrated security. Any suggestions why it fails when using IIS?
Business Accounts
Answer for Membership
by: jimbecherPosted on 2008-12-02 at 13:02:08ID: 23080759
That would be the correct way to refer to socket. I would say try it and see what happens. It is non-destructive and won't hurt anything.