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.
-
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
2 Comments
Bernard Cheah said
You don't really step 4, right? as the membership now is dynamic unless you turn it off.
Also, why not tcp/ip protocol even the db locate on the same box?
http:// said
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?