Solved

Logging userinfo. (asp/sql server)

Posted on 1998-10-14
5
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

717 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