Export (0) Print
Expand All

IIS Insider - March 2005

By Brett Hill

Resolving the Error: The server failed to load application'

Q: We recently installed IIS 5 on a Windows 2000 server and applied all the updates. Static web pages like HTML or loading pictures works fine, but we can't get it to render ASP. Various errors occur, but the most common is The server failed to load application 'LM/W3SVC/1/Root'. We registered ASP.dll and have examined the Metabase, which look fine. What can we do other than reinstall?

A: The most likely cause of this problem is that the DTC coordinator service has not started. If it has started, then look in the Event Viewer for a message regarding a failed logon for the IWAM_servername account. The dllhost.exe processes is the "host" for web applications that are marked to run as Medium (pooled) or High (Isolated) in the IIS Manager. The IWAM account (as it is often called) is the process identify for dllhost.exe. If the password for this account isn't the same in the metabase and the local SAM, applications set to run in Medium or High application protection (called "out of process applications") will fail to start. If and only if you are getting the message about the IWAM account failing to logon, do the following:

  1. Back up your Metabase.bin and the registry.
  2. Run synciwam.vbs from the \Inetpub\AdminScripts scripts folder

In some situations, IIS 5 encounters problems when creating the necessary COM+ components during installation. Check if there is a file with the name ~clbcatq.dll in your \%windir%\system32 folder. This file will not normally be present, and if present, it could indicate that a problem occurred during installation.

To solve this:

  1. Delete the ~clbcatq.dll file and the contents of the \%systemroot%\registration folder.
  2. Then click Start, Settings, Control Panel, Add/Remove Programs, and Add/Remove Windows Component.
  3. Without making any changes, click Next. The system will now go through what appears to be an installation process, but won't make any changes. During this process, the required COM packages are checked and in some cases fixed in this situation.
  4. Finally, restart IIS and see if your application runs.

Please Note   If your application does not run, open Component Services Manager console from Administrative Tools, and delete the IIS In Process Applications, IIS Out of Process Pooled Applications, and IIS Utilities packages. At a command prompt, type the following:

cd %windir%\system32\inetsrv rundll32 wamreg.dll, CreateIISPackage regsvr32 asptxn.dll

(Note that CreateIISPackage is case sensitive.)

Reboot the server and retry your applications. See http://support.microsoft.com/default.aspx?scid=kb;en-us;309051 for additional details.

Pushing Log Files to a SQL Server

Q: I recently discovered that we could configure IIS to push the log files to a SQL server rather than the normal text files. This would help us immensely in studying traffic, identifying problems, and analyzing web site use. I am concerned, however, that there may be some hidden costs involved with using ODBC. Are there any problems using this method to consolidate logs into a SQL database?

A: Yes, you can implement logging to a SQL database and yes there are some performance trade-offs. There are two primary considerations involved with ODBC logging. First, your performance of logging events will suffer as it is far more expensive to invoke a call to a database than write to text file. On busy servers this can have a large impact to performance. Second, should there be a problem with recording the log files related to either the network connection or SQL server, it is likely you won't know about it for some interval. During this interval which logging entries will not be written. ODBC logging is actually quite an old feature of IIS and is in my opinion not a great option.

Nevertheless, as you say, having your log files in a SQL database is a great way to do analysis on your traffic when you have large volumes of data to mine. The good news is, there are two excellent ways to move data from your logs into a SQL server without having to reconfigure IIS and manage the performance impacts.

Within SQL, you can create a job to periodically pull the data from the IIS logs files. SQL Server can easily import large log files on a periodic basis that you define. This works very well when you have a set a log files to study that is not on a live server. When you want to move log files from a live IIS server to a SQL server, I would suggest you do what the IIS admins at Microsoft.com do – push the IIS logs to SQL using the free Microsoft Log Parser Tool.

The Log Parser tool allows you to execute a command that will parse through all of your IIS servers, and all of your websites (or specified server and sites), extract the log file entries you indicate, then send that record set to a designated SQL server. In addition, using the –iCheckpoint feature, the Log Parser Tool will remember the last line it parsed on a log file and start from there the next time. In this way, every time your "push" log parser query is run, only new log file entries are sent to the SQL server.

To effectively use the Log Parser Tool requires some study, but you will find the tool has so many capabilities useful to an IIS admin that you'll wonder how you got along without it.

There have been several versions of the Log Parser Tool so you want to be sure to use the latest, which as of this writing is 2.2. You can download the tool for free from http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en. You can also find helpful links, and even a new book on the Log Parser Tool at http://www.logparser.com.

Enabling or Disabling WebDAV Per Web Site

Q: Can you explain a bit about WebDAV? We're trying to determine if we can use it for a few of our authors. Is there a way to enable WebDAV for one web site but not others?

A: WebDAV (Web Distributed Authoring and Versioning) is a way to publish content to and from an IIS server (IIS 5 or IIS 6) over HTTP. Since WebDAV is based on an RFC and is implemented via HTTP, it works through most firewalls without modification. This gives you the opportunity to publish to and from the web server without using specialized protocols like FTP or specialized COM objects.

The mechanics behind WebDAV are complex and details such as what specific client OS you use to connect to which specific version of IIS can matter. For example, let's say you want to enter an http request to open a Web Folder that shows the content of the target location. Figure 1 shows the dialogue box that appears in Internet Explorer 6 (IE) when you select File, Open. You can see the checkbox marked "Open as a Web Folder" which instructs IE to attempt to open a web folder rather than a web page.

iisi01

Figure 1   Open as Web Folder check box

You can use the web folder to drag and drop content, governed of course by the security configuration details on the target server. When you've got it working properly, it's really easy and works great for quickly getting content to and from the server without specialized software and does not require opening more ports on the perimeter.

WebDAV implementation can be a bit confounding at times due, by in large, to variations in client implementations combined with different web folder providers on the server. For example, FrontPage Server Extensions (FPSE) provides Web Folder capability that looks exactly like a WebDAV web folder and will provide the connection to the client instead of httpext.dll (the WebDAV provider on IIS 5 and IIS 6) when it is installed. However, FPSE may require the client to authenticate when httpext.dll would not. These, plus a few other details can make the implementation details over an enterprise unwieldy, nevertheless it can be very useful.

To answer your question, IIS does not have a built in way to enable or disable WebDAV on a per site basis. In IIS 5, WebDAV is enabled for all websites by default. To disable it, use URLScan to block incoming WebDAV requests (which are blocked by default) or see the Knowledge Base article How to disable WebDAV for IIS 5.0. With IIS 6, you simply enable or disable WebDAV with the Web Service Extensions node in IIS Manager. WebDAV is disabled in IIS 6 by default.

See also:

Submit your questions to the IIS Insider. Selected questions along with the answers will be posted in a future IIS Insider column.

For a list of previous months' questions and answers on IIS Insider columns, click here.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft