501 not implemented, IIS 6 and TRACE verb

I was working on an issue and was getting a 501 not implemented error when trying to use the TRACE verb.  Here is a couple good links that discuss this further.


‘Registry entries that can be added.
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d779ee4e-5cd1-4159-b098-66c10c5a3314.mspx?mfr=true


 ‘Thread on this topic.
http://www.issociate.de/board/post/232980/Disabling_TRACE_verb_on_IIS_6.0.html


Microsoft’s recommendation is not to have this enabled on a production server.
“Do not leave EnableTraceMethod enabled on a production system, as it can reveal back-end server address information to a malicious user.”


 

IIS7 post #47 – Stats since migrating to IIS 7.0

I was curious the traffic numbers served by IIS 7.0 since I migrated last summer.  Here is the raw totals.  Granted this includes spiders, bots and search engine indexes.  This is pretty cool considering it is running on a desktop with 512 MB of RAM and hooked up to an DSL line.  When I ran build 5600, it was up for 149 days without a reboot, the only reason I rebooted was I messing around with Remote Management.  Since then, I’ve upgraded to Beta3 and have not rebooted.  The current uptime is almost 74 days.  For a beta OS, that is 223 days of uptime with 2 reboots, one to correct a mistake I did and one to rebuild the box.  RTM should be pretty solid.

PS: I ran Beta 2 for awhile before upgrading to build 5600.

This is the stats for www.IISLogs.com between 8/1/06 and 7/21/07
Page Views
– 245,624
Raw Visits – 164,809
Total Hits – 709,575
Total Bandwidth – 9,880,017


Numbers of downloads.
2,910 (841 was IISLogsLite 2.0)

Happy IIS 7.0!


Steve

IIS7 post #46 – Customize your Windows Server 2008 – Server Core installation

I was tinkering with the June CTP of Server Core, which has the IIS role.  I wanted a server that just served Images and logged the request.  I need three modules (global and regular) modules.  Anonymous Authentication, StaticFileModule and HttpLogging.  Here is the syntax I used to customize my server.  You probably would want StaticCompressionModule, it can help save some bandwidth, but for my exercise, I wanted the least amount of modules. This is one example of how you can customize your IIS 7.0 install and have a specific type of IIS 7.0 server. 


Article on Server Core
http://www.iis.net/articles/view.aspx/IIS7/Explore-IIS7/Getting-Started/IIS7-on-Server-Core?Page=1


This installs the default server role
start /w pkgmgr /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel

This removes unnecessary modules
AppCMD Uninstall Module “HttpCacheModule”
AppCMD Uninstall Module “StaticCompressionModule”
AppCMD Uninstall Module “DefaultDocumentModule”
AppCMD Uninstall Module “DirectoryListingModule”
AppCMD Uninstall Module “ProtocolSupportModule”
AppCMD Uninstall Module “CustomErrorModule”
AppCMD Uninstall Module “RequestFilteringModule”
AppCMD Uninstall Module “UriCacheModule”
AppCMD Uninstall Module “FileCacheModule”
AppCMD Uninstall Module “TokenCacheModule”
AppCMD Uninstall Module “RequestMonitorModule”

Open applicationHost.config (c:\windows\system32\inetsrv\config\applicationHost.config) and look at the <Global Modules> and <Modules> section.


Take care,


Steve Schofield
Microsoft MVP – IIS

IIS7 post #44 – IIS7 and Apache on the same machine.

There was a question on http://forums.iis.net about having Apache and IIS7 on the same box.  here are the instructions I tested on Vista RTM and Windows Server 2008 B3.  This assumes you have two ip addresses on the box, 192.168.0.90 and 192.168.0.91.  It can be any ip’s.


1) Added or make sure your machine has two ip’s
2) Open a command prompt
3) Type netsh
4) Type http
5) Type sho iplisten.  It should be blank
6) Type add iplisten ipaddress=192.168.0.90
You should get IP address successfully added
7) Type sho iplisten again
It should sho 192.168.0.90 in the list
8) Type exit to get out of netsh
9) Type type netstat -an.  See if you notice 192.168.0.90:80 in the list.  If you see 0.0.0.0:80, do an iisreset

10) Download and install Apache ( I did it with 2.2.4)
http://mirror.nyi.net/apache/httpd/binaries/win32/apache_2.2.4-win32-x86-no_ssl.msi
11) Do a default install,
12) Open httpd.conf and adjust the ip listen to 192.168.0.91:80


# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
#Was 80
#Change to


Listen 192.168.0.91:80


12) Restart the Apache service.  (for some reason the start / stop thing didn’t work for me, I used net stop apache2 net start apache2.)
13) Type netstat -an
14) You should see 192.168.0.90:80 and 192.168.0.91:80.  Open a browser and test both IP’s to see if IIS7 and Apache come up.
15) Test restarting Apache service to see if it works after that.
16) Turn off Apache, browse IIS, turn of IIS, browse Apache. Test it every which way to see if it works.


Hope this helps

IIS7 post #43 – Remote Logging and the computer name

This post applies to IIS6 as well, however I did most of my testing on Windows Server 2008 beta 3.  This blog covers my adventure getting my logs configured so they would be stored on a remote computer..  There was a simple fix once I understood “WHY”, isn’t everything. 🙂  Click this link for docs on Technet how to setup remote logging.   The documentation states use an UNC path \\Servername\Sharename and use the Servername.  


Here is where the adventure begins.  In the past I have used Servername and IP Address together.  This time the http.sys process didn’t like the ip address.  I enabled http.sys logging, which is really helpful.  It was throwing the bolded error listed below when I was flushing the log file to disk.   This was the entire set of entries logged browsing localhost.  Here is the link to how to enable HTTP.sys logging.  I even went as far as using SetSPN, (Service Principal Name) in Active Directory.  I learned how to use the SetSPN tool or manually create the entries using ADSIEdit.msc. I caution anyone making these changes in a production environment.  I was getting an 15000 Event log message. There are other event log messages covered in section on Technet.  This indicated my permissions were not correct.  


In the end, after making sure the permissions were correct over and over, I plugged the \\ComputerName\Logfiles in the path, ran my batch file and it worked.  I hope this helps someone else, the http.sys logs were not very descriptive, but they were at least available to help point me in the right direction.  So, I’d rather have a somewhat descriptive log entry vs. nothing.  🙂 


Batch File I used to reproduce the issue. 

REM The reason I was running an IISReset is to catch the attempt to create the log directory and file every attempt. 
iisreset

REM Start http.sys tracing

logman start httptrace -p Microsoft-Windows-HttpService 0xFFFF -o httptrace.etl -ets

REM Start an instance of IE to make a request to the local machine
“C:\Program Files\Internet Explorer\iexplore.exe” http://localhost

REM flush the log data from the http.sys process to disk
netsh http flush logbuffer

REM Stop http.sys tracing
logman stop httptrace -ets

REM Convert the http.sys output file to CSV format
tracerpt httptrace.etl -of csv -o httptrace.csv /y

REM Open the output file in Notepad
notepad httptrace.csv 


Http.sys raw log output in CSV format


  Event Name,       Type,     Event ID,    Version,    Channel,      Level,     Opcode,       Task,            Keyword,        PID,        TID,     Processor Number,  Instance ID,   Parent Instance ID,                              Activity ID,                      Related Activity ID,           Clock-Time, Kernel(ms),   User(ms), User Data
  EventTrace,     Header,            0,          2,          0,          0,          0,          0, 0x0000000000000000, 0x00000000, 0x000005F8,                    0,             ,                     ,   {00000000-0000-0000-0000-000000000000},                                         ,   128277049250717083,       1120,        300,     8192, 67174406,     6001,        1, 128277049550199938,   100144,        0, 0x0,        2,        1,        4,        0,     2243, 0x90B9F178, 0x90B9F18C, 128277045204899856,          3579545, 128277049250717083, 0x1,        0, “httptrace”, “C:\Users\Administrator\Desktop\httptrace.etl”
Microsoft-Windows-HttpService , ConnConnect ,           21,          0,         16,          4,         28,          4, 0x0000000000000010, 0x00000004, 0x0000005C,                    0,             ,                     ,   {00000000-1288-0000-8199-7f014bbbc701},                                         ,   128277049348638271,      12400,          0, 0x842E3798,       28, “[::1]:80”,       28, “[::1]:49190”
Microsoft-Windows-HttpService , ConnIdAssgn ,           22,          0,         16,          4,         55,          4, 0x0000000000000012, 0x00000004, 0x000005AC,                    0,             ,                     ,   {00000000-1288-0000-8199-7f014bbbc701},                                         ,   128277049349263755,         70,          0, 0xFB00000080000002, 0xFB00000060000001, 0x842E3798
Microsoft-Windows-HttpService ,   RecvReq ,            1,          0,         16,          4,         11,          1, 0x0000000000000102, 0x00000004, 0x000005AC,                    0,             ,                     ,   {00000000-1288-0000-8199-7f014bbbc701},   {80000002-0000-fb00-0000-000000000000},   128277049349265138,         70,          0, 0xFB00000080000002, 0xFB00000060000001,       28, “[::1]:49190”
Microsoft-Windows-HttpService ,     Parse ,            2,          0,         16,          4,         12,          1, 0x0000000000000002, 0x00000004, 0x000005AC,                    0,             ,                     ,   {80000002-0000-fb00-0000-000000000000},                                         ,   128277049349322067,         80,          0, 0x842E4750,        4, “http://localhost:80/
Microsoft-Windows-HttpService ,   Deliver ,            3,          0,         16,          4,         13,          1, 0x0000000000000102, 0x00000990, 0x000009B0,                    0,             ,                     ,   {80000002-0000-fb00-0000-000000000000},                                         ,   128277049405515637,        490,         50, 0x842E4750, 0xFB00000080000002,        1, “DefaultAppPool”, “http://localhost:80/“,        0
Microsoft-Windows-HttpService , FastRespLast ,            9,          0,         16,          4,         18,          1, 0x0000000000000006, 0x00000990, 0x000009C4,                    0,             ,                     ,   {80000002-0000-fb00-0000-000000000000},                                         ,   128277049406633664,         50,          0, 0xFB00000080000002
Microsoft-Windows-HttpService ,  FastResp ,            8,          0,         16,          4,         19,          1, 0x0000000000000006, 0x00000990, 0x000009C4,                    0,             ,                     ,   {80000002-0000-fb00-0000-000000000000},                                         ,   128277049406663752,         50,          0, 0xFB00000080000002, 0xFB00000060000001,    200, “GET”,        0,      1,        0
Microsoft-Windows-HttpService ,  FastSend ,           12,          0,         16,          4,         21,          1, 0x0000000000000006, 0x00000990, 0x000009C4,                    0,             ,                     ,   {80000002-0000-fb00-0000-000000000000},                                         ,   128277049406939181,         60,          0, 0xFB00000080000002,    200
Microsoft-Windows-HttpService , LogFileCreateFailed ,           49,          0,         16,          2,         59,          9, 0x0000000000000800, 0x00000004, 0x000005AC,                    0,             ,                     ,   {00000000-0000-0000-0000-000000000000},                                         ,   128277049412643098,        220,          0, 0xC0000022, “ResponseLogging “, “Site “, “W3C “, “\dosdevices\UNC\192.168.0.125\UncLogFiles\W3SVC1\u_ex070630.log”,        0
Microsoft-Windows-HttpService , LogFileWrite ,           51,          0,         16,          4,         61,          9, 0x0000000000000800, 0x00000004, 0x000005AC,                    0,             ,                     ,   {00000000-0000-0000-0000-000000000000},                                         ,   128277049412646736,        220,          0, 0xC0000022, 0x0, “ResponseLogging “, “Site “, “W3C “, “CacheMiss”,        0
Microsoft-Windows-HttpService ,   RecvReq ,            1,          0,         16,          4,         11,          1, 0x0000000000000102, 0x00000004, 0x000005AC,                    0,             ,                     ,   {00000000-1288-0000-8199-7f014bbbc701},   {80000003-0000-fb00-0000-000000000000},   128277049416593131,        220,          0, 0xFB00000080000003, 0xFB00000060000001,       28, “[::1]:49190”
Microsoft-Windows-HttpService ,     Parse ,            2,          0,         16,          4,         12,          1, 0x0000000000000002, 0x00000004, 0x000005AC,                    0,             ,                     ,   {80000003-0000-fb00-0000-000000000000},                                         ,   128277049416635156,        230,          0, 0x842E4750,        4, “http://localhost:80/welcome.png
Microsoft-Windows-HttpService ,   Deliver ,            3,          0,         16,          4,         13,          1, 0x0000000000000102, 0x00000004, 0x000005AC,                    0,             ,                     ,   {80000003-0000-fb00-0000-000000000000},                                         ,   128277049416664003,        230,          0, 0x842E4750, 0xFB00000080000003,        1, “DefaultAppPool”, “http://localhost:80/welcome.png“,        0
Microsoft-Windows-HttpService , FastRespLast ,            9,          0,         16,          4,         18,          1, 0x0000000000000006, 0x00000990, 0x000009C4,                    0,             ,                     ,   {80000003-0000-fb00-0000-000000000000},                                         ,   128277049416850837,         80,          0, 0xFB00000080000003
Microsoft-Windows-HttpService ,  FastResp ,            8,          0,         16,          4,         19,          1, 0x0000000000000006, 0x00000990, 0x000009C4,                    0,             ,                     ,   {80000003-0000-fb00-0000-000000000000},                                         ,   128277049416875583,         80,          0, 0xFB00000080000003, 0xFB00000060000001,    304, “GET”,        0,      0,        0
Microsoft-Windows-HttpService ,  FastSend ,           12,          0,         16,          4,         21,          1, 0x0000000000000006, 0x00000990, 0x000009C4,                    0,             ,                     ,   {80000003-0000-fb00-0000-000000000000},                                         ,   128277049416956811,         80,          0, 0xFB00000080000003,    304
Microsoft-Windows-HttpService , LogFileWrite ,           51,          0,         16,          4,         61,          9, 0x0000000000000800, 0x00000004, 0x000005AC,                    0,             ,                     ,   {00000000-0000-0000-0000-000000000000},                                         ,   128277049417997790,        280,          0, 0xC0000022, 0x0, “ResponseLogging “, “Site “, “W3C “, “CacheMiss”,        0
Microsoft-Windows-HttpService , ConnClose ,           23,          0,         16,          4,         29,          4, 0x0000000000000010, 0x00000004, 0x0000005C,                    0,             ,                     ,   {00000000-1288-0000-8199-7f014bbbc701},                                         ,   128277049461028971,      12680,          0, 0x842E3798,        1
Microsoft-Windows-HttpService , ConnCleanup ,           24,          0,         16,          4,         30,          4, 0x0000000000000010, 0x00000004, 0x0000005C,                    0,             ,                     ,   {00000000-1288-0000-8199-7f014bbbc701},                                         ,   128277049461031181,      12680,          0, 0x842E3798


Happy Logging,


Steve Schofield
Microsoft MVP – IIS