David Wang

David Wang on IIS, ISAPI, Exchange, Virtual Server, and whatever else I fancy...

Browse by Tags

Tagged Content List
  • Blog Post: HOWTO: List all Virtual Directories and Paths of a List of Servers

    Question: I need to audit web servers in my domain, and would like to be able to connect to each server, and enumerate the virtual directories -- ultimately leading to a link to each web site hosted by the server. Can this code be modified to get that information? Thanks. Answer: Yes, you...
  • Blog Post: HOWTO: Basic Native/Managed Code Interop

    IIS7 core extensibility model supports both native and managed code as first-class citizens. So, I feel it is time for a little refresher on managed/native code interop... starting with the more popular route of how to wrap native code API for use within managed code. I am using the newer syntax introduced...
  • Blog Post: HOWTO: Convert between JScript Array and VB Safe Array

    I recently got a question about how to manipulate the LIST data type within JScript since my sample code only illustrated VBScript. Well... one reason why that example is in VBScript is because LIST manipulation (a VB SafeArray) is more straight forward and requires much less code in VBScript. ...
  • Blog Post: HOWTO: Monitor Virtual Server Events

    I think Virtual Server Events and Asynchronous Tasks are two of the least utilized features of the Virtual Server Administration API. Contrary to the often-asked task of "find the VM, turn it off, manipulate its VHD, then turn it back on", which shows the synchronous, task-driven side of the VS Admin...
  • Blog Post: HOWTO: Install and Run PHP on IIS7, Part 3

    A short while ago, I came out with a small script to properly configure PHP for IIS7. Sure enough, I got asked to make a similar one for IIS6. So, I figure that while I am at it, I might as well cover IIS4, IIS5, and IIS5.1 as well since it is not very different, and put it all into one script so that...
  • Blog Post: HOWTO: Install and Run PHP on IIS7, Part 2

    A couple of months ago, I wrote a quick and dirty entry on how to install PHP on IIS7. The main purpose of that entry was to explain the details of what was going on as well as cookie-cutter instructions of one way to successfully install PHP on IIS7. Well, the responses that I have received from...
  • Blog Post: HOWTO: Enumerate IIS website and ftpsite configuration (VBScript using ADSI)

    I recently got a request to make a script to illustrate how to enumerate useful values from both Web and FTP sites serviced by IIS, so I decided to make some additions to the original script tool located here to allow it to easily enumerate both Web and FTP sites. The modifications basically illustrate...
  • Blog Post: HOWTO: Useful ASP page to retrieve Request and send Response Headers

    I am finishing up on the series of ASP pages that show how to: Send Responses of arbitrary Status Code Send Responses with arbitrary types of Entity Body Send Responses with arbitrary Headers (this entry) Query Request Headers (this entry) You know, the common programmatic stuff one...
  • Blog Post: HOWTO: Useful ASP page to return configurable HTTP Status codes

    Sometimes, you just want a simple test page on IIS to do some automated testing of your code that interacts with IIS. Here is another useful one in the series. Question: Hi, I have some negative testing therefore need to have IIS to return 403, 404 or 500. How can I configure each? An automated...
  • Blog Post: HOWTO: Rename the Computer running IIS6

    Question: Hi , I have two web servers. One web server(w2k3Ent) and IIS 6.0 in a work group and One identical Web Server in the Domain. I want to now rename the Server names of the both, to comply some policy. Will the IIS functionality be affected because the IUSR accounts still be left with old...
  • Blog Post: HOWTO: Retrieve Request Headers using ISAPI, ASP, and ASP.Net

    Developers frequently confuse Request Headers, Response Headers, and Server Variables as well as the appropriate syntax to retrieve/manipulate each of them, depending on the API (ISAPI, ASP, and ASP.Net). I am going to clarify all of this right now. :-) Question: So I've managed (thanks to your...
  • Blog Post: HOWTO: Perform VHD Maintenance Automatically

    Question: I would like to have a night script to run on guest machines and perform the following tasks: 1. start / restore from saved state if machine is not running (preferably disconnected from network in order to preserve resources) 2. run on the guest the VHD maintenance utility (manually done...
  • Blog Post: Why IISADMIN Service Starts on Reboot even when set to Manual Startup

    Question: I have a Windows XP SP2 machine that requires IIS running only sometimes, so I set these service to Manual startup (I use a script to start them when I need them): IIS Admin Simple Mail Transfer Protocol (SMTP) World Wide Web Publishing However when I boot the machine I can see that...
  • Blog Post: HOWTO: Detect Process Bitness

    In an ideal world, everything runs as native bitness (64bit program on 64bit OS, 32bit program on 32bit OS) and life goes on. However, sometimes you need to run that legacy 32bit program on a 64bit OS and need to configure things a little differently as a result. How can you detect this WOW64 case (32bit...
  • Blog Post: HOWTO: Add and Remove an ISAPI Filter using JScript

    Question: Hello, I am looking to automate installation of an ISAPI filter since I want it to be a part of my server deployment. Is there a way to install an ISAPI filter dll using a javascript or a vbscript? If yes can someone give me pointers to the same? Thanks, Answer: Ok... this...
  • Blog Post: HOWTO: Retrieve and Interpret ISAPI Filter Status

    Question: Is there way to script a check on the success or failure of the Filter, ie a vbscript object that contains the state of loaded DLL's? One can get the list of filters installed from the metabase, but how would one get the state? The metabase doesn't seem to contain that. Doesn't necessarily...
  • Blog Post: HOWTO: Compile and Use my ISAPI Code Samples

    Since I get this following question on how to compile/use my ISAPI code examples quite a bit, I wager I should just have a blog post that answers it once and for all. But, come on you guys... I already did the hard part in providing the full compiling sample source code illustrating the solution to...
  • Blog Post: HOWTO: Synchronize User Credentials in IIS

    Question: Hello, I recently had to modify a domain administrator account on my system and as a result parts of my web site are no longer operational. I keep getting a 401.1 error whenever my web pages attempt to execute a Perl script that dynamically builds web pages. Regular HTML pages execute...
  • Blog Post: HOWTO: Redirect the browser to a new URL based on Referer

    While I do not recommend users to freely write ISAPI Filters and install them on IIS, there are still tasks that favor/require ISAPI Filter... even on IIS6 with HSE_REQ_EXEC_URL. Question: Hello David, I came across your blog several times when I am searching for "ISAPI extensions and filters...
  • Blog Post: Rewriting Bookmarks for Atlas?

    I have not checked out the AJAX craze surrounding Atlas, so I am not certain what is the goal here. However, that does not stop me from making observations about how the user's code is not exactly doing what is hoped... ;-) Question: When I have a URL that includes a bookmark (#) referencing a...
  • Blog Post: HOWTO: Remotely start and stop a Virtual Machine on Virtual Server 2005

    Here is one of the usual questions about Virtual Server - how to remotely control the Guest VM. Actually, Virtual Server 2005 Administration API is pretty rich and supports these scenarios - you just need to write a little bit of code to do so. Small price to pay for automation. Question: I would...
  • Blog Post: Some Sample Code to illustrate XML manipulation by JScript

    It seems that some folks just want free code. Question: Hi, I am not sure if it's really that on 18 Mar 2004 wrote in the newsgroups how to do stuff with XML files in WSH. "I do this all the time and have tons of script code that read/manipulate XML files." I wonder if you could send me one...
  • Blog Post: HOWTO: ISAPI Filter which Logs original Client IP for Load Balanced IIS Servers

    Invariably, when you run IIS servers that are load-balanced or forwarded requests behind some other network device, you will find that IIS logs the IP of the network device and not the original client that made the request. Technically, there is no standard describing how to address/fix this situation...
  • Blog Post: HOWTO: Use ISAPI GetServerVariable

    Ah, yes... GetServerVariable is one of the most frequently used function call of ISAPI Extension and ISAPI Filter APIs, but unfortunately, it is also one of the most incorrectly used. Very few people heed the documentation to check the return value and handle errors correctly, and considering this...
  • Blog Post: HOWTO: Useful ASP page that sends various formats of valid HTTP response

    A common problem faced by ISAPI Filter writers that buffer/modify HTTP response is to ensure that this code works for all of the valid formats of HTTP responses that can be sent by the web server. Question: *) Can you suggest any tools / techniques that will enable me to test all code paths. At...
Page 1 of 2 (35 items) 12