Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


November 1999

IIS Informant

RSS
Subscribe to Windows Web Solutions | See More Active Server Pages (ASP) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

My company hosts a couple hundred Web sites as a Web farm. Trying to find a customer's Web site among the hundreds is frustrating. How can I sort the list of virtual Web sites in Internet Service Manager (ISM)?

When I first read this question, I thought there had to be a way to sort Web sites because it seems like such a simple notion. However, I found out that my first impression was wrong.

When you create a Web site, IIS assigns the site an instance number in the metabase. ISM lists Web sites in instance-number order (i.e., the order in which you created the Web sites). You can't change this order via the user interface (UI), and I haven't found any third-party utilities that perform this task. Although you can change the instance numbers programmatically, the IIS support staff at Microsoft insists that programmatically changing the numbers is a bad idea. Evidently, you can't resequence Web sites without recreating the virtual Web sites.

Fortunately, this situation will change with Windows 2000 (Win2K) Web services (i.e., IIS 5.0). With IIS 5.0, you can list the Web sites in sequences other than instance-number order. Until IIS 5.0 is available, however, you might consider using IIS's Web-based administration capability (i.e., the Hypertext Markup Language Administrator—HTMLA) and search for the desired site with Microsoft Internet Explorer (IE).

How can I replicate a site across several servers?

IIS doesn't have a replication feature. However, you can use Microsoft Site Server's Content Replication to replicate a site across several servers.

I have one domain with three Windows NT servers (a PDC, BDC, and member server). For illustration purposes, let's call the domain BUYPRODUCTS. Each server has unique content and has IIS with FTP installed. If JoeB logs on with a domain account and tries to access FTP on the member server, he receives the error message 530 User JoeB cannot log in. Login failed. But if JoeB logs on as BUYPRODUCTS\JoeB, he can access FTP on the member server. In other words, if users don't include BUYPRODUCTS\, they can't log on to the FTP server because the server validates the accounts against its local (i.e., member server) user database. How can I make the FTP server validate against the domain controller accounts instead of its local accounts?

You can use two methods to set the domain that the FTP server uses to log on. The first method uses Windows Scripting Host (WSH):

  1. Open an MS-DOS session.

  2. Change the directory to \%windir%\system32\inetsrv\adminsamples. (The windir directory is usually winnt.)

  3. Type cscript //h:cscript.

  4. Type the following command, replacing "Domain" with your domain's name (include the quotes):
    adsutil set msftpsvc/DefaultLogonDomain "Domain"
  5. Stop and restart the FTP service.

The second method is useful if you don't have WSH:

  1. Copy mdutil.exe from the NT 4.0 Option Pack CD-ROM to the \%windir%\system32 directory.

  2. Open an MS-DOS session, and change the directory to \%windir%\system32.

  3. Type the following command, replacing Domain with your domain's name (don't include the angle brackets or quotes):
    mdutil set msftpsvc/DefaultLogonDomain -utype ut
       server -dtype string -value Domain
  4. Stop and restart the FTP service.

When setting up redirection for a Web site, I always select The exact URL entered above check box to send the client to a specified URL, as Screen 1 shows. How does this redirection differ from selecting the check box A permanent redirection for this resource?

If you select The exact URL entered above check box, you redirect all requests made to any file in the virtual directory. For example, suppose you want to redirect all requests to the Newinfo virtual directory on Server1 (i.e., \\Server1\Newinfo) to the Latestinfo directory on Server2 (i.e., \\Server2\Latestinfo). To set up the redirection, select the Home Directory page from Virtual Directory, Properties. Select A redirection to a URL. Type http://Server2/Latestinfo in the Redirect to box and select The exact URL entered above check box. Now, IIS will redirect not only all requests coming to http://Server1/Newinfo but also any requests such as http://Server1/Newinfo/Schedule.htm to http://Server2/Latestinfo. Thus, if you select The exact URL entered above check box, all requests point a virtual directory or Web site to one location. When this type of server redirection occurs, the server responds to the browser with the status code 302 Temporary Redirect.

If you select the check box A permanent redirection for this resource, you achieve the same result (i.e., all requests to a virtual directory or Web site go to one location), but the server reports the status code 301 Permanent Redirect. What's the difference between the 301 and the 302 status code? The IIS documentation reports that the 301 code not only redirects the request but also is the signal to permanently change URLs such as bookmarks on "some browsers."

When I saw the phrase "some browsers" instead of IE, I wondered what Microsoft meant, so I conducted a quick redirection test in IE 5.0. I created a bookmark to a Web site on my server, permanently redirected the Web site, and then used the bookmark to access the Web site. After hitting refresh, the redirect occurred, but the bookmark didn't change on the browser. Thus, I assume the phrase "some browsers" means some non-Microsoft browsers. So, the only difference between 301 and 302 code is that the 302 code, unlike the 301 code, doesn't signal the permanent change of URLs (e.g., bookmarks) on non-Microsoft browsers when you redirect requests.

When you're redirecting requests, you can use not only an absolute URL path but also variables and syntax in the Redirect to box. Using variables and syntax gives you more flexibility. For example, you can use the same entry to redirect calls for an Active Server Pages (ASP) file to one location and calls for a Common Gateway Interface (CGI) file to another location. Table 1 provides the redirection variables that you can use.

You can also use syntax to redirect calls for ASP files to one location and calls for HTML files to another location. Here are the rules for syntax redirection.

  1. The first character in the Redirect to box must be an asterisk (*).
  2. You must separate arguments with a semicolon (;).
  3. You must select The exact URL entered above check box.

For example, the entry in Screen 1's Redirect to box routes all calls for an ASP file to default.asp and all calls for an HTML file to default.htm.

Using syntax to redirect requests is simple. However, you need to know about one possible pitfall. If a browser requests a page that's also the target of the redirection, a loop occurs. For example, if the browser requests xyz.htm and you're redirecting all .htm requests (which includes requests for xyz.htm), a loop occurs. To prevent default.htm (and other pages in the same situation) from being redirected, go to the individual file (in this case, default.htm) and place an exclamation point (!) in the Redirect to box.

All my users require access to the FTP server. When they authenticate, the FTP server places them at the FTP server's home directory. How can I change the system so that the FTP server places users in their folders after they log on?

To change the location, select the FTP server you want to use. Create a virtual directory, giving it a user's name. Repeat this process for every user. If you have many users, you can automate this task with Active Directory Service Interfaces (ADSI) objects and the CreateVirtualFTPdir script in the Microsoft Windows Internet Information Server Resource Kit. After you create a virtual directory for each user, turn off anonymous access. Now when users authenticate, the FTP server automatically moves them to their personal virtual directory.

End of Article



Reader Comments
Thanks to the guy who authored the FTP permission problem (authenicating to local accounts, instead of Domain accounts). This has been a problem I have had to live with for 2 years... I even called Microsoft, and of course they gave me some disfunctional answer, which avoided the problem...

Thank you, Thank you, Thank you, Thank you, a thousand times!

Signed tickled pink!

Russell Mangel August 13, 2000


I just found this website and have already learned so much thanks for all the help. Just one question though I am running two 2k3 servers and want to replicate the webpages how do i do that. Please remember i am new at this.
Thanks A Million,

Randy

Randy February 20, 2004


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

VMware and the Future of Virtualization

What's next for virtualization and business IT? Windows IT Pro senior editor Jeff James speaks with VMware President and CEO Diane Greene on the future of virtualization technology. ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...


IIS and Web Administration Whitepapers The Five Secrets to Controlling Your SharePoint Environment

Extended Validation SSL Certificates

Related Events Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

IT Connections
Dive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities.

Attention User Group Leaders...
Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes and add Windows IT Pro & SQL Server Mag articles alongside your own message!.

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Get SQL Server 2008 at WinConnections
Don’t miss Microsoft Exchange and Windows Connections conferences, the premier events for Microsoft IT Professionals in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.



Interested in Email Encryption?
Read about the advantages of identity-based encryption in this free report.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing