Friday, May 25, 2007

Enable IIS 6.0 Extensions using VBScript

If you've worked with IIS 5 and IIS 6, you know that IIS 6 has some tighter default security settings. For example, an administrator must take explicit steps to enable the server execution of ASP/ASP.NET applications. This is accomplished with a few quick clicks, but I'm always looking for shortcuts, e.g.

    Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC")IIsWebServiceObj.EnableWebServiceExtension "ASP.NET v1.1.4322" IIsWebServiceObj.SetInfo
Taking it a step further, suppose you have a proprietary extension, for instance a dll or exe which serves as an engine to render dynamic html. In other words, say you have a very OLD application. Here's how you would handle that wrinkle:

    Option explicit
    dim IIsWebServiceObj

    Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC")

    'Enable Proprietary Extention
    IISWebServiceObj.AddExtensionFile "c:\mydll.dll", true, "MyDLL", true, _ "MyProprietaryExtensions"
    IIsWebServiceObj.SetInfo

    wscript.echo "success!"

2 comments:

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.
Oes Tsetnoc | Semangat Mengembalikan Jati Diri Bangsa

pay per head said...

Hello I want to congratulate to them by its site of the Web of the excellent looks like entertained and very good very to me it elaborated.