How To: Serve WAP Websites (.WML) Using IIS 6.0

Author:

Jonathan Maltz MVP

COMMUNITY SOLUTIONS CONTENT DISCLAIMER

MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

SYMPTOMS

WAP websites with the .wml file extension return a 404 "File Not Found" error message even though the file exists in the web page directory.

CAUSE

By default, IIS 6.0 ships "locked-down" to increase security greatly.  One of the features of this "locked-down" state is to only allow certain file extensions (for example; .html; .txt) but .wml is not included in the default list of allowed file types.

RESOLUTION

In the IIS Manager, expand the computer's name, and the "Web Sites" folder, then right-click the website which you would like to allow .wml files to be served on, and select "Properties".  Alternatively, you can right click on the "Web Sites" folder and select "Properties" to apply these settings to all of the websites hosted on the computer, instead of applying the settings website by website.
 
In the Properties screen, click on the "HTTP Headers" tab.  On the bottom of this property page, click the "MIME Types…" button.  A list of the custom MIME types set on this computer will now be displayed.  On the right side of the MIME type window click the "New…" button.  Since you want to allow .wml sites to be served, type the extension ".wml" (without the quotes) into the first text box.  In the "MIME type" text box, type "text/vnd.wap.wml" (without the quotes) and press the "OK" button on both of the dialogs, and "Apply" on the Properties window.

MORE INFORMATION

To set "index.wml" as the website's default webpage, go to the "Documents" tab of the website's "Properties" and click the "Add…" button, then type "index.wml" (without the quotes) into the "Default content page" text box and press the "OK" button.  For increased security you can also remove the pre-existing items in the list after adding index.wml.  When you are done, press "Apply" to apply the new settings.
Properties

Article ID: 555014 - Last Review: 14 Feb 2017 - Revision: 1

Microsoft Internet Information Services 6.0

Feedback