"Active DS IIS Namespace Provider" -> IIS 6.0 MIME types

I'm writing a C# code fragment to configure some MIME types of a IIS 6.0 server. However, I need the correct assembly reference to use "IISOle.MimeMapClass".

Docs say that I need a reference to "Active DS IIS Namespace Provider" on the COM tab (in the Add Reference dialog) but it's not there. I see "Active DS Type Library" which I've added and it doesn't help.

How do I get this missing COM reference?

FYI, I'm doing development on a Windows Server 2008 system (IIS 7.0) even though the target servers that this code will run on will be Windows Server 2003 (IIS 6.0)
0
RogerWilco
5/1/2009 10:56:56 PM
asp.net.config-deploy 12495 articles. 0 followers. Follow

3 Replies
650 Views

Similar Articles

[PageSpeed] 12

You should use ADSI or WMI to manage IIS 6.0 configuration.

see http://blogs.msdn.com/ramesh_r/archive/2004/03/24/95109.aspx

i can post some code sample if you need.


Bruce
DiscountASP.NET: Developer Ready ASP.NET Web Hosting
- Microsoft Gold Certified Partner
- Voted 2008, 2007, 2006 & 2005 Best ASP.NET Web Hosting by asp.netPRO Magazine
0
Bruce
5/2/2009 1:28:03 AM
Thanks. I'd LOVE some MIME type configuration code samples if you have some!

I've been reading through the link and related sites on WMI configuration, but direct code samples would be great!
0
RogerWilco
5/4/2009 4:56:47 PM

 There's a script that comes with IIS 6.0 named ADSUtil.vbs (I think in the system32\inetsvr) and within it there's this function which should give you some good idea on how to use this.



        ' Create a new MimeMapList of Mime Entries
        ReDim MimeMapList(ArgCount - 3)

        MimeOutPutStr = "MimeMap                         : (MimeMapList) "

        ' Fill the list with mime entries
        For MimeEntryIndex = 0 To UBound(MimeMapList)

                MimeStr = Args(2 + MimeEntryIndex)
                MimeOutPutStr = MimeOutPutStr & """" & MimeStr & """ "

                Set MimeEntry = CreateObject("MimeMap")

                MimeEntry.MimeType = Right (MimeStr, Len(MimeStr) - InStr(MimeStr, ","))
                MimeEntry.Extension = Left(MimeStr, InStr(MimeStr, ",") - 1)

                Set MimeMapList(MimeEntryIndex) = MimeEntry
        Next

        If (Err.Number <> 0) Then
                ReportError ()
                WScript.Echo "Error trying to Create the Mime Map List."
                WScript.Quit (Err.Number)
        End If

        MimeMapObject.MimeMap = MimeMapList
        MimeMapObject.Setinfo

        If (Err.Number <> 0) Then
                ReportError ()
                WScript.Echo "Error Trying to set the Object's ""MimeMap"" property to the new mimemap list."
                WScript.Quit (Err.Number)
        End If

        WScript.Echo MimeOutPutStr

End Function


Bruce
DiscountASP.NET: Developer Ready ASP.NET Web Hosting
- Microsoft Gold Certified Partner
- Voted 2008, 2007, 2006 & 2005 Best ASP.NET Web Hosting by asp.netPRO Magazine
0
Bruce
5/4/2009 6:58:10 PM
Reply:

Similar Artilces:

Namespace objects are giving error when running through the IIS 6.0"-Object not declared"
Dear friends,   I have installed MV studio 2005 in our Windows 2003 SBS server.Now  I have created a website using asp.net. I have a login screen,where i am validating the user. using VB.Net for coding , I am using the Namespace say "bn" ,and I have class called "cl" in it..I compiled this file and save the dll in a "bin" folder in my root folder. In my login.aspx ,the coded as dim objuser as new bn.cl This is working fine when I am running the login.aspx through the visual studio.net IDE.But when I am opening the same file throgh the IIS, he page giving comp...

IIS 6.0 issue when force "User must change password at next logon" on Active Directory
Hi guys I need your help again. I have a 2005 web application running on IIS 6.0, windows server 2003. I must have the Authenticated access on "Integrated Windows Authentication" enabled and "Anonymous access" Disabled. Also on the Virtual Directory the execute permissions have "Scripts and Executables".  Everything is fine! When the users try to access the app the prompting to authenticate appears and the users can authenticated. This is the normal situation. But the problem is when the administator of the active directory force the user to thi...

what is "IIS 6.0 native mode"???
Can you explain more about this and what is the differences between using this mode and non-using this mode?Parco LeeOwner + Webmaster + System Engineer + Professional ProgrammerSoftDweller Lab (a software laboratory)http://www.softdweller.comA professional laboratory for new technology softwares developing by .NET.http://www.nowlover.com Native mode is also known as worker process isolation mode (WPIM), each web application will run in an application pool. This mode uses kernel mode drivers (HTTP.SYS) for improved performance, and also allows more recycling options. In general this model ...

Upgrade to "server 2003"/IIS 6.0?
Hi:What are the downsides and limitations of using Windows XP Pro with IIS 5.1 over using Windows server 2003 with IIS 6.0 for hosting a website?I am trying to make sure that the upgrade to Windows server 2003 does not proves to be an overkill in terms of expenses.Thanks in advance!kremlins IIS 6.0 is more robust and is hosted on a real server system that is Windows 2003. Apart from that you can have multiple web sites and multiple application pools for your web applications. These let you control the behavior of each web application separately.LKZ:.\Arrobianos/.http://www.lukiller.net...

"The page cannot be displayed" when trying to download a file over the Internet from IIS 6.0
 Hi, I am developing an ASP.NET web application with which a user can download a static HTML or XML file by clicking on a hyperlink. The only problem is that I can't get my application working on IIS 6.0 over the Internet. If I will try to click on the hyperlink to download a file I'll get the message "The page cannot be displayed Cannot find server or DNS Error". However, the application works on my development IIS 5.1 computer and our IIS 6.0 test server via the localhost but not over the Internet. I have set f...

TB 2.0.0.6 "All" vs. "Unread" messages
Help! I was just offered this new TB, and I downloaded and installed it. Have clicked and looked and can't seem to get it to go to "Unread"...... advice, please....... And the new "Tag" in the upper bar.....I point and click and try to drag it somewhere to get rid of it......but nothing happens....... William B. Lurie wrote: > Help! I was just offered this new TB, and I > downloaded and installed it. Have clicked and looked > and can't seem to get it to go to "Unread"...... > advice, please....... > try compact the folders...

"The IIS worker process for the launched URL is not currently running"
When I try to debug my web site in VS 2008 sp1 and IIS 7.0 (I am using the customer server option) I get the error message "The IIS worker process for the launched URL is not currently running" I think this is a bug in SP1. Some have suggested to simply change the binding on the web site from a statis IP to "All Unassigned". While it seems to work for one site, it does not address a bigger problem. For example, lets say I have a single code base that is utilized for multiple web sites. So I set up 3 Sites in IIS 7 and I place 3 IPs on my network adapter and put...

Can't set SMTP's RelayIpList property using namespace "IIS Provider"
While executing of the request, which should allow relay for SMTP service from 127.0.0.1 only, I'm getting strange error response: ===== 8< ===== 8< ===== 8< ===== 8< ===== 8< ===== 8< ===== <response> <data/> <errorContext description="Unknown VT_DISPATCH object type. Possible IIS version incompatibility. IIS://localhost/SmtpSvc/1 RelayIpList 0x8000ffff: Catastrophic failure" code="0x8000ffff" executeSeqNo="1"> <errorSource namespace="IIS Provider" procedure="SetProperties"/> ...

How to add .Net Framework 3.5 to IIS Properties tab? How to show "shortcut" or "Confiure" 3.5 icon on Control Panel?
I have installed VS 2008 Express, SQL 2005 Express and .Net Framework 3.5.   On IIS Properties, the web sites I have created, on the ASPnet tab of the Properties dialog desktop, clicking the NetFramework dropdown arrow, showed only the .NetFrameowrk 1.1 and 2.0.  How can I add the .Net Framework 3.5 to the dropdown list?   Why I can not see the "short-cut" or "Configuration"icon for .NetFramework 3.5?  Only those for 1.1 and 2.0 were shown.  Thanks,  Hi Read the Following,What exactly is ASP.NET 3.5 ? Take a look at the v3.5 framework...

Swap a "1" or "0" for a "Y" or "N"
I have a sql query that returns rows of data and one field returns a 1 (which means yes) or a 0 (which means no).  On my vb.net page, how do I replace the 1 with a Yes and the 0 with a No?  Or do I do this in the sql?  How do I do this in sql?Never make important decisions on a Monday! By default, VB.Net can understand 1 as Yes and 0 as No.I believe you are using those DB values for your Boolean Operations.Try to use If <DBValue> then <Operation>. If you are really need Yes/No .... Declare boolean variable in VB.net and set those variables. Thanks and R...

superreview cancelled: [Bug 333925] NSS Solaris build compiled with Forte 6 update 2 fails the "AES ECB Decrypt" and "AES CBC Decrypt" tests in cipher.sh; and may not run on Ultrasparc I and II : [Att
Wan-Teh Chang <wtchang@redhat.com> has cancelled Wan-Teh Chang <wtchang@redhat.com>'s request for superreview: Bug 333925: NSS Solaris build compiled with Forte 6 update 2 fails the "AES ECB Decrypt" and "AES CBC Decrypt" tests in cipher.sh; and may not run on Ultrasparc I and II https://bugzilla.mozilla.org/show_bug.cgi?id=333925 Attachment 219671: Solution 2: use -xchip=ultra2 and no -xcache flag to compile lib/freebl https://bugzilla.mozilla.org/attachment.cgi?id=219671&action=edit ------- Additional Comments from Wan-Teh Chang <wtchan...

superreview requested: [Bug 333925] NSS Solaris build compiled with Forte 6 update 2 fails the "AES ECB Decrypt" and "AES CBC Decrypt" tests in cipher.sh; and may not run on Ultrasparc I and II : [Att
Wan-Teh Chang <wtchang@redhat.com> has asked Neil Williams <neil.williams@sun.com> for superreview: Bug 333925: NSS Solaris build compiled with Forte 6 update 2 fails the "AES ECB Decrypt" and "AES CBC Decrypt" tests in cipher.sh; and may not run on Ultrasparc I and II https://bugzilla.mozilla.org/show_bug.cgi?id=333925 Attachment 219671: Solution 2: use -xchip=ultra2 and no -xcache flag to compile lib/freebl https://bugzilla.mozilla.org/attachment.cgi?id=219671&action=edit ------- Additional Comments from Wan-Teh Chang <wtchang@redhat.com>...

"type" attribute of "Section" element in web.config file
Hi, I want to create my custom section in web.config, but it dosn`t work and no exceptions are thrown My code: namespace Bus {   public class WebConfigurationSection: ConfigurationSection   {     public WebConfigurationSection()     {     }     [ConfigurationProperty("FromMail", IsRequired=true)]     public String FromMail     {       get { return (string)this["FromMail"]; }       set { this["FromMail"] = value; }   &nb...

what are the uses of "System.Configuration" and "System.Configuration.Provider" namespaces
I am working on a project in which we are implementing custom authentication and we are extensively using "System.Configuration and System.Configuration.Provider namespaces" these two namespaces what are the uses of these namespaces.   can somebody please help on this is very greatful to you.  System.Configuration is the namespace contains the classes for accessing/manupulating applcaiton configuration file [like web.config in webapplication or app.config in windows application]For System.Configuration.Provider check http://msdn.microsoft.com/en-us/library/system.co...

Is there a quick a dirty way of achieving border="0" cellpadding="0" cellspacing="0" for html tables?
As the question states... I have HTML tables all over the place and really want to avoid having to manually add border="0" cellpadding="0" cellspacing="0" for each of them, can I override this in CSS?   Any help would be greatly appreciated. Thanks. Declare a css class for the table with all these properties initialized. That will do the workThanks & RegardsJacobMark As Answer if this post Helped you  Yes, define a class in css:.table { padding: 0px; border: 0px; } The only trick will be adding class="table" to the...

Web resources about - "Active DS IIS Namespace Provider" -> IIS 6.0 MIME types - asp.net.config-deploy

Resources last updated: 12/16/2015 2:06:03 PM