ODBC Logging, IIS 7.5, SQL Server 2008

I wrote an article in 2007 how to setup ODBC Logging on IIS 7.0.   There was a post recently in the newsgroups someone wanted to setup and couldn’t get it working.  My article uses sql server 2005, IIS 7.0.  I was able to reproduce an issue on my test server (Windows Server 2008 R2, x64).  Here are some items I ran into. 




  • Can’t run the application pool can’t run in 32 bit.  This error came up

HTTP Error 500.0 – Internal Server Error


The page cannot be displayed because an internal server error has occurred.



Detailed Error Information














Module CustomLoggingModule
Notification LogRequest
Handler StaticFile
Error Code 0x8007001f


















Requested URL http://localhost:8080/iisstart.htm
Physical Path c:inetpubwwwrootiisstart.htm
Logon Method Anonymous
Logon User Anonymous
Failed Request Tracing Log Directory C:inetpub



  • Can run the application pool using the ApplicationPoolIdentity (Default user)

Login errors show up in the SQL Log viewer applet. 





  • Named Pipes needs to be enabled on sql server




  • Application Pool runs as a domain user, which has access to the database.

 




  • When you setup your DSN, make sure to explicitly test connection with the user setup in the ODBC logging config

Additional Steps to follow besides the original article


1) Follow my original setup


http://weblogs.asp.net/steveschofield/archive/2007/12/20/iis7-post-57-how-to-setup-odbc-logging-in-iis-7-0.aspx


2) Create a domain user


3) Setup the application pool to run as the domain user


4) Add user to the IIS_IUSRS group


5) Log into SQL Server, grant DBO or DB-Reader, DB-Writer permissions on InternetDB database


After doing these additional steps, I was able to run ODBC Logging and track information.  As I mentioned in my previous article, ODBC logging is not meant to run on a busy website.  “Millage may vary”.


Hope this helps,


Steve Schofield
Microsoft MVP – IIS

One thought on “ODBC Logging, IIS 7.5, SQL Server 2008”

  1. Hi all,Can you help me?
    I had one problem with MS.SQL server 2008.
    I have 2 server.
    one server setup application in windows server 2008.
    other server setup MS SQL server 2008 in Windows server 2008.
    How to connect ODBC from windows server 2008 t0 windows server 2008?

    Like

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s