MimeType

You can use the MimeType property of the IIsMimeType object to GET and PUT the MIME types for objects of type IISMimeType.

Syntax

DirObj.MimeType=string

 

Parameters
DirObj
An IIS Admin Object of type IIsMimeType.
string
This is a string that specifies the MIME type for the object.
Code Example
<% 
  Dim DirObj
  Dim MimeMapNode
  Dim MimeMapList
  Dim MimeMapEntry
  Set Obj = GetObject("IIS://LH/MimeMap")
  MimeMapList = DirObj.MimeMap
  Redim preserve MimeMapList (Ubound(MimeMapList)+1)
  Set MimeMapEntry = CreateObject ("IIsMimeTypeEntry")
  MimeMapEntry.MimeType = "Text/Plain"
  Mime.Extension = ".log"
  Set MimeMapList (Ubound(MimeMapList)) = MimeMapEntry
  DirObj.MimeMap = MimeMapList
  DirObj.Setinfo
%> 
 
See Also

IIsMimeType, Extension