IIS 7 Hello World Module Walkthrough
The other day I found out that the Vista SDK includes a compiler. I was very excited to find this out, cause now creating a "Hello World" IIS 7 C++ module only requires one huge install (and two little ones).
Build:
- Install the Vista SDK
- Unzip attached helloworld.zip to \temp\hello
cd "\Program Files\Microsoft SDKs\Windows\v6.0\Bin"setenv.cmd /debug /x86 /vistacd \temp\hellobuild.bat
Deploy:
cd %windir%\system32\inetsrvappcmd add backup hellobackupappcmd install module /name:Helloworld /image:\temp\hello\hello_world.dllappcmd set config -section:handlers "-+[name='HelloHandler',path='*.hello',verb='*',modules='Helloworld']"
Test:
- Install wfetch
- Set the path field to: /a.hello
- Expected: Hello World
Debug:
- Install the debugger to c:\debuggers (checkout c:\debuggers\debugger.chm index tab for more details on the commands below)
- cmd:
net stop was /y - cmd:
cd %windir%\system32\inetsrv - cmd:
c:\debuggers\windbg -2 -g -G w3wp.exe /debug - debugger: Ctrl-Break
- debugger:
.sympath SRV*c:\localsymbols*http://msdl.microsoft.com/download/symbols - debugger:
bm hello_world!*execute* - debugger:
g - wfetch: F5