Posts Mentioning RSS Toggle Comment Threads | Keyboard Shortcuts

  • Chewy Chong 11:00 pm on March 31, 2004 Permalink | Reply  

    History of RISC Chipmaking at IBM 

     
  • Chewy Chong 8:42 pm on March 31, 2004 Permalink | Reply  

    Viewing all Web Server Variables with a few lines of ASP/ASPX code 

    ASP

    <html>
    <body>
    <% For Each variable In Request.ServerVariables
     Response.Write(“<b>” + variable + “</b><br>”)
     Response.Write(“” + Request.ServerVariables(variable) + “<br>”)
     Next %>
    </body>
    </html>

     

    ASPX (place code in the ASPX’s code behind’s Page_Load method)

    Response.Write(“<b>Application Pool Credentials (Test)</b><br>”);

    Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name + “<br><br>”);

    foreach(string aKey in Request.ServerVariables)

    {
      Response.Write(“<b>” + aKey + “</b><br>”);
      Response.Write(Request.ServerVariables[aKey] + “<br>”);
    }

     

     

     
  • Chewy Chong 11:19 pm on March 30, 2004 Permalink | Reply  

    Troubleshooting the Application of Group Policy 

    General tips on how to troubleshoot the application of group policy.
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;250842

    When policy is being applied, you can enable ‘tracing’ to a log file so you can see how the processing is going.  This is a registry change.
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;221833
    <% For Each variable In Request.ServerVariables
     Response.Write(“” + variable + “
    “)
     Response.Write(“” + Request.ServerVariables(variable) + “
    “)
     Next %>

     
  • Chewy Chong 8:29 pm on March 30, 2004 Permalink | Reply  

    Adding an Additional Element to an Array in VBScript 

    This is a heck lot more painful than using a cooler language such as Java or C#.  In VBS (and VB), an array defined with a set size.  If you want to add an additional element to the array (therefore increasing the array size by 1), you need to redeclare the array using the ‘ReDim’ command.  To keep the information stored w/in the array, use the ‘Preserve’ key word.

       ReDim Preserve MyArray( UBound(MyArray) + 1 )
       MyArray( UBound(MyArray) ) = newElement

     

     
  • Chewy Chong 3:20 am on March 29, 2004 Permalink | Reply  

    IIS 6 HTTP Compression (GZip) with ASP.NET 

    Did you know IIS 6 has the capability to compress HTTP traffic?  You’ll need a browser that can uncompress this traffic also but the performance gains are rather good.  IIS will check to see if the browser supports this feature and turns it on whenever applicable. 

    I did some performance measurements a while back for a client.  IIS 6 for Outlook Web Access 2003.  It compresses everything including mail attachments.  Good performance.

    The .NET guy has good ‘how-to’ here:
    http://dotnetguy.techieswithcats.com/archives/003475.shtml

     
  • Chewy Chong 11:18 pm on March 25, 2004 Permalink | Reply  

    Using MOM to Check Group Policy Health 

    Microsoft just released a new MOM management pack.  I’m glad they did because my project was just about to ask me to put something like this together.  Talk about good timing!

    http://www.microsoft.com/downloads/details.aspx?FamilyId=A2F3CEE9-AE2C-4F0F-B43D-94FC9FF36C22&displaylang=en

    The Group Policy Management Pack for Microsoft Operations Manager (MOM) monitors Group Policy infrastructure and in-scope client side extensions. Specifically, it:

    • Provides Group Policy health monitoring for:
      • Group Policy core infrastructure/registry client-side extension
      • Scripts client-side extension
      • Software installation client-side extension
      • Security client-side extension
      • Folder redirection client-side extension
      • Disk quota
    • Provides a knowledge base of useful information to help administrators resolve an issue when Group Policy fails to process.
     
  • Chewy Chong 2:36 am on March 24, 2004 Permalink | Reply  

    Programmatically Accessing All Objects in IIS 

    One of my co-workers was attempting to modify the Application Pool used by a Web Application.  In her tests, she noticed that even after changing the Application Pool used by a Web App via the GUI, her script always reported she was using the ‘Default App Pool’.  I wrote the following to iterate through all objects in IIS.  This was our result:

     

    1 (IIsWebServer) AppPool = DefaultAppPool

      Filters (IIsFilters)

      IIsCertMapper (IIsCertMapper)

      ROOT (IIsWebVirtualDir) AppPool = ChewyPool

        aspnet_client (IIsWebDirectory) AppPool = ChewyPool

    AppPools (IIsApplicationPools)

      ChewyPool (IIsApplicationPool)

    Filters (IIsFilters)

      ASP.NET_1.1.4322.573 (IIsFilter)

      Compression (IIsFilter)

        deflate (IIsCompressionScheme)

        gzip (IIsCompressionScheme)

        Parameters (IIsCompressionSchemes)

    Info (IIsWebInfo)

      Templates ()

        Public Web Site (IIsWebServer) AppPool = DefaultAppPool

          Root (IIsWebVirtualDir) AppPool = DefaultAppPool

        Secure Web Site (IIsWebServer) AppPool = DefaultAppPool

          Root (IIsWebVirtualDir) AppPool = DefaultAppPool

    87257621 (IIsWebServer) AppPool = DefaultAppPool

      filters (IIsFilters)

      root (IIsWebVirtualDir) AppPool = ChewyPool

     

    You’ll notice the default IIsWebServer (denoted by the server id number ‘1’) reports using the ‘Default App Pool’.  I believe this parameter exists due to inheritance and the value is not referenced by IIS.  You’ll notice the actual App Pool value we set via the GUI (ChewyPool) shows up on a member IIsWebVirtualDir object called ROOT.  This appears to be where IIS stores which App Pool is used by the Web Application.

     

    The script used to dump the above info is as follows:

    Dim objWebApps

    Set objWebApps = GetObject(“IIS://localhost/W3SVC”)

    Dim objWebApp

     

    RecurDump objWebApps, “”

     

    Sub RecurDump (objNode, strSpacing)

       Dim objSubNode

          

       For Each objSubNode In objNode

              If (objSubNode.KeyType = “IIsWebServer”) Then

                    WScript.Echo strSpacing & objSubNode.Name & ” (” & objSubNode.KeyType_
                    & “) AppPool = ” & objSubNode.AppPoolID

       &nbsp
    ;      Elseif (objSubNode.KeyType = “IIsWebVirtualDir”) Then

                    WScript.Echo strSpacing & objSubNode.Name & ” (” & objSubNode.KeyType_

                    & “) AppPool = ” & objSubNode.AppPoolID

              Elseif (objSubNode.KeyType = “IIsWebDirectory”) Then

                    WScript.Echo strSpacing & objSubNode.Name & ” (” & objSubNode.KeyType_

                    & “) AppPool = ” & objSubNode.AppPoolID

              Else

                    WScript.Echo strSpacing & objSubNode.Name & ” (” & objSubNode.KeyType_

                    & “)”

              End If

              RecurDump objSubNode, strSpacing & “  “

       Next

    End sub

     
  • Chewy Chong 7:27 am on March 23, 2004 Permalink | Reply  

    Understanding Kerberos 

    No… not the three headed dog that guards the entrance to Haides but rather, the authentication mechanism used in Windows 2000+.

    Simple Explanation
    http://www.microsoft.com/technet/prodtechnol/windows2000serv/maintain/security/kerberos.mspx

    Hard Core Explanation (more fun)
    http://www.microsoft.com/technet/prodtechnol/windows2000serv/deploy/confeat/kerberos.mspx

    Why did they need a dog to guard the entrance of hell? (Includes a picture)
    http://www.theoi.com/Tartaros/Kerberos.html

     
  • Chewy Chong 6:15 am on March 22, 2004 Permalink | Reply  

    ADSI VBS Script Snippets for IIS 6 App Pool/Web App Manipulation 

    Here’s a few snippets of VBS code I wrote while trying to automate the creation of the web app and associated application pool for the project.  For more information about the IIS ADSI Provider (ADSI is the mechanism I used to do all this.. you can also use WMI):
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_prog_iaoref.asp

    Option Explicit

    ‘ —- Creates an Application Pool and assigns pool credentials
    Dim objAppPools, objAppPool
    Set objAppPools = GetObject(“IIS://localhost/w3svc/AppPools”)

    Set objAppPool = objAppPools.Create(“IIsApplicationPool”,”Sample-App-Pool”)
    objAppPool.WAMUserName = “test\test1″
    objAppPool.WAMUserPass = “test1″

    objAppPool.SetInfo

    ‘ —- Loop through all IIS Application Pools on the server
    ‘ —- Shows the user credentials used by the pool
    Dim objAppPools, objAppPool
    Set objAppPools = GetObject(“IIS://localhost/w3svc/AppPools”)

    For Each objAppPool In objAppPools
     WScript.echo “AppPoolName = ” & objAppPool.Name & “(” & objAppPool.KeyType & “)”
     wscript.echo “  User= ” & objAppPool.WAMUserName
     wscript.echo “  Pass= ” & objAppPool.WAMUserPass
    Next

    ‘ —- Loop through all IIS Objects on the server (Web Apps, App Pools, Filters, etc)
    ‘ —- If it is a IISWebServer, display the application pool used
    Dim objWebApps
    Set objWebApps = GetObject(“IIS://localhost/w3svc”)

    Dim objWebApp

    For Each objWebApp In objWebApps
     wscript.echo “WebAppName = ” & objWebApp.Name & “(” & objWebApp.KeyType & “)”
     if (objWebApp.KeyType = “IIsWebServer”) then
      wscript.echo “  PoolID = ” & objWebApp.AppPoolID
     end if
    Next

    ‘ —- Shows the type of object returned
    Set objWebApp = Getobject(“IIS://localhost/W3SVC/2/Root”)
    wscript.echo “Object Type Returned = ” & objWebApp.KeyType

     
  • Chewy Chong 7:56 pm on March 21, 2004 Permalink | Reply  

    IIS 6.0 Blogs by the Microsoft IIS PMs 

    Want to know some interesting bits about IIS 6 from the people who knows it inside and out?

    Rich Ersek
    http://blogs.gotdotnet.com/richarde/

    Thomas Deml
    http://iisgeek.no-ip.com/

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel