IIS7 – post #53 – Setup IIS 7.0 to log using NULL sessions between workgroup computers.

One of the questions I’ve seen from time to time in the newsgroups and forums is how to setup remote logging between workgroup computers.   This blogs shows the steps how to setup to Windows Server 2008 computers to store logs on a remote computer.   Caution, this opens up the remote log files to be accessed by anonymous users, so only use when absolutely necessary.   The preferred method is use an authenticated user and have the machines in the same domain.

One thing that needs to be done before setting this up is make sure both machines can resolve each other.  Either using WINS or DNS

1) Create two machines named w2k8 (Web Server) and w2k8-2 (File Server)

2) Create folder called Logfiles on w2k8-2 (File Server).  Create a Share and grant appropriate folder security
 a) Open command prompt on file server
 b) mkdir c:LogsFiles
 c) net share Logfiles=c:Logfiles /Grant:Everyone,FULL  
 d) cacls c:logfiles /G Administrators:F SYSTEM:F Everyone:C
 e) Are you sure (Y/N)? Type y
 f) Processed dir: c:Logfiles

3) Install IIS on w2k8 (Web Server)
 a)Servermanagercmd -install web-server

4) Configure logging on the Default web Site on w2k8 (Web server)
 a)appcmd set sites “Default Web Site” -logFile.directory:\w2k8-2LogFiles

5) Configure Local Security Policy on w2k8-2 (File server)
 *Programs, Administrative Tools, Local Security Policy, Local Policies, Security Options*
 a) Enable:Network access:Let Everyone permissions to apply to anonymous users

 b) Add Logfiles share to the Network access:Shares that can be accessed anonymously

6) Test process on w2k8 (Web Server)
 a) Open http://localhost/

7) Open command prompt on w2k8 (Web server)
 a) Type netsh http flush logbuffer

8) Look on w2k8-2 (File server) and see if the logs showed.
#Software: Microsoft Internet Information Services 7.0
#Version: 1.0
#Date: 2007-10-29 22:45:07
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2007-10-29 23:59:59 ::1 GET /iisstart.htm – 80 – ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727) – 200 0 0 913 269 100
2007-10-29 23:59:59 ::1 GET /welcome.png – 80 – ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727) http://localhost/iisstart.htm 200 0 0 185173 308 230


Steve Schofield
Microsoft MVP – IIS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: