ASP page and 302 HTTP Status Code in IIS Log

P

probashi

Hi,

I have an ASP page that inserts a record into database. Some times I
find that multiple records are being inserted (with same data) in to
database. I checked IIS log and found the following:

Test.asp 302 0 0 917 7266 HTTP/1.1
...
Test.asp 401 5 4692 1834 0 HTTP/1.1
...
Test.asp 302 0 0 1179 11171 HTTP/1.1

For this case I got 3 records inserted into database.

Note: Just after the database insert I am issuing an
response.redirect().

Thanks
(e-mail address removed)
 
S

Steven Burn

Little difficult to say without seeing the code your using ..... (my mind reader isn't working today <g>)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
A

Adrienne

Hi,

I have an ASP page that inserts a record into database. Some times I
find that multiple records are being inserted (with same data) in to
database. I checked IIS log and found the following:

Test.asp 302 0 0 917 7266 HTTP/1.1
..
Test.asp 401 5 4692 1834 0 HTTP/1.1
..
Test.asp 302 0 0 1179 11171 HTTP/1.1

For this case I got 3 records inserted into database.

Note: Just after the database insert I am issuing an
response.redirect().


Is your script checking for dupes? Is your table set up with unique
fields? If your table is set up for unique fields, it should throw an
error that you can catch, and act accordingly.
 
K

Kristofer Gafvert [MVP]

Hello,

I think you are listing the requests in wrong order.

A web browser first try to request content anonymously. If the content
cannot be accessed anonymously, IIS responds with a 401 status code. Now
the client sends a new request (this can happen automatically, depending
on the settings in Internet Explorer) with logon credentials. If this
succeeds, the webserver may reply with a 302 status code (no changes).

The ASP file should have only been executed once however, since in the
first try, the browser was denied access to the file.

If the same content is posted twice to the database, i think that you
should have a look in your code. I do not think it is a problem with IIS,
and i do not think that these log entries is related to your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top