Solved

LMHOSTS only working partially.

Posted on 2008-10-28
5
741 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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