please dont rip this site

IIsMimeMap

You can use the IIsMimeMap object to set the inherited Multipurpose Internet Mail Extension (MIME) mappings used by the Web servers.

The IIsMimeMap object is an ADSI object, but not an ADSI container object.

ADsPath

IIS://MachineName/MimeMap

Where MachineName can be any name or "LocalHost".

Syntax

varReturn = object.{Method}
 

Parts

varReturn
A variable that receives the return value from the method.
object
A variable that contains the IIsMimeMap object, usually as a result of a previous GetObject operation.
Method
The object method chosen.

Properties

ADSI Object Properties

Metabase Properties
MimeMap

Methods

ADSI Object Methods Standard methods for ADSI objects
Common Object Methods Methods, other than ADSI methods, common to all IIS Admin Objects

Code Example

<% 
Dim MimeMapObj, aMimeMap, MMType, MMExtension, i, aMimeMapNew() 
Const ADS_PROPERTY_UPDATE = 2 
' Get the mimemap object 
Set MimeMapObj = GetObject("IIS://LocalHost/MimeMap") 
' Get the mappings from the MimeMap property 
aMimeMap = MimeMapObj.GetEx("MimeMap") 
' Display the mappings 
ShowMM(MimeMapObj) 
' Add a new mapping 
i = UBound(aMimeMap) + 1 
Redim Preserve aMimeMap(i) 
Set aMimeMap(i) = CreateObject("MimeMap") 
aMimeMap(i).Extension = ".jnq" 
aMimeMap(i).MimeType = "junque/my-junque" 
MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", aMimeMap 
MimeMapObj.SetInfo 
' Display the mappings 
ShowMM(MimeMapObj) 
' Delete a mapping by copying to a new map array 
i = 0 
For Each MMItem in aMimeMap 
    If MMItem.Extension <> ".jnq" Then 
        Redim Preserve aMimeMapNew(i) 
        Set aMimeMapNew(i) = CreateObject("MimeMap") 
        aMimeMapNew(i).Extension = MMItem.Extension 
        aMimeMapNew(i).MimeType = MMItem.MimeType 
        i = i + 1 
    End If 
Next 
MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", aMimeMapNew 
MimeMapObj.SetInfo 
' Display the mappings 
ShowMM(MimeMapObj) 
' Subroutine to display the mappings in a table 
Sub ShowMM(MMObj) 
aMM = MMObj.GetEx("MimeMap") 
' Set up table to display mappings 
Response.Write "<HR><TABLE BORDER><CAPTION><B>MIME Maps</B></CAPTION>" 
Response.Write "<TR><TH>Type</TH><TH>Extension</TH>" 
' Display the mappings in the table 
For Each MM in aMM 
    Response.Write "<TR><TD>" & MM.MimeType & "</TD>" 
    Response.Write "<TD>" & MM.Extension & "</TD></TR>" 
Next 
Response.Write "</TABLE>" 
End Sub 
%> 
 

© 1997 by Microsoft Corporation. All rights reserved.


file: /Techref/inet/iis/iis/htm/sdk/aoii8m5s.htm, 4KB, , updated: 2002/5/22 16:36, local time: 2024/5/14 00:47,
TOP NEW HELP FIND: 
18.218.81.166:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.massmind.org/techref/inet/iis/iis/htm/sdk/aoii8m5s.htm"> IIsMimeMap</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to www.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .