Solved

LMHOSTS only working partially.

Posted on 2008-10-28
5
734 Views
Last Modified: 2011-10-19
In order to test recognition of different domains/hosts in a web application, I wanted to use LMHOSTS to have my local IIS 7 react to different URLs. Only the default web site is configured - all those URLs are supposed to be handled by the same application.

I have, for example, the domains alstest1.de and alstest2.de (read: Al's Test One and Al's Test Two). The LMHOSTS entries for alstest1.de, www.alstest1.de, alstest2.de and www.alstest2.de all work properly and redirect to localhost.

The other entries (www.vanitytest1.de, client1.alstest1.de) do not. What could I be doing wrong? I'm especially confused as the urls mentioned above work fine, even when I change the order in the LMHOSTS file...

Please help.

lmhosts
0
Comment
Question by:softwareservice
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
mrwalker15 earned 250 total points
ID: 22823943
Why dont you use dns instead of netbios?

you should change the hosts file instead.
0
 
LVL 1

Author Comment

by:softwareservice
ID: 22824405
Because apparantly I don't know better. Could you point me in the right direction, please? TIA!
0
 
LVL 3

Assisted Solution

by:mrwalker15
mrwalker15 earned 250 total points
ID: 22824435
Under c:\windows\system32\drivers\etc\ you have a file called hosts.

Insert all the entries and Ip addresses that you need.

after that, run from command prompt.

ipconfig /flushdns
0
 
LVL 1

Author Comment

by:softwareservice
ID: 22825235
The HOSTS file worked. Thank you!
0
 
LVL 1

Author Closing Comment

by:softwareservice
ID: 31510835
Thanks a lot!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now