Solved

Logging userinfo. (asp/sql server)

Posted on 1998-10-14
5
263 Views
Last Modified: 2013-12-25
I have sql server 7, iis 4 and vb 6.

I want to log what ever users do in the sql server. To do that i need to know which user does which thing. How do i do this with asp or an iis-application???
0
Comment
Question by:osthus
  • 3
  • 2
5 Comments
 

Author Comment

by:osthus
ID: 1855704
Edited text of question
0
 
LVL 28

Accepted Solution

by:
sybe earned 200 total points
ID: 1855705
- 1. Another way is analysing the server-log file, there is all information you need. there are applications available that make it very easy to analyze the log file (WebTrends).

- 2. When users are logged in on NT, then in ASP you can get the username with
Request.ServerVariables("LOGON_USER")
In every ASP page you could write a few lines of code to put in the database which user looked at which page at what time

strSQL = "INSERT table (username,page,access_date) value (" &_
Request.ServerVariables("LOGON_USER") & ", " &_
Request.ServerVariables("PATH_INFO") & ", " &_
"CONVERT(DateTime,'" & Date() & "',103) )"

' supposing you already have a connection to the database called "Conn":

Conn.Execute(strSQL)

0
 

Author Comment

by:osthus
ID: 1855706
to sybe

Sorry, let me refrase my question.

I'm making a iis/asp application which make it possible to interact with the sql-server. What web-users does is what i want to log.

The problem is that its multiple users and one iis-application.

Anyway, Using NT-security is a good proposal, but how can I use the security used in SQL-server??
0
 
LVL 28

Expert Comment

by:sybe
ID: 1855707
Make a login page. Store the username/password in SessionVariables and use those in the ODBC connection string:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=YourDSN;SERVER:servername;UID=" & Session("username") & ";PWD=" & Session("password") & ";APP=;DATABASE=Databasename"

0
 

Author Comment

by:osthus
ID: 1855708
thanks a lot, im using nt-secrity in a connection string......-
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question