473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Session Question

Here is the process on the site before I ask the question:

User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record

I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.

can someone help me figure out what might have happened so i can
correct it?
Jun 27 '08 #1
7 1980
On May 29, 4:31*pm, Mangler <webmas...@repairresource.comwrote:
Here is the process on the site before I ask the question:

User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record

I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). *mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.

can someone help me figure out what might have happened so i can
correct it?
i apologize in advance, not sure why it got posted so many freaking
times.
Jun 27 '08 #2
Mangler wrote on 29 mei 2008 in microsoft.public.inetserver.asp.general:
Here is the process on the site before I ask the question:

User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record
A session is not something that can be inserted, it is not a value.

a session variable value could be put in the database, but why put that in
a [clientside] hidden formfield? [these fields are not exactly hidden to
the user if he wants to see or manpulate it.]

If a user logs in succesfully, you can set a session variable to his
usernumber, and use that to put into the database. The user does not have
to know that number, and the number does not have to be outside the server
anyway, as the user is identified by the asp session.id.

[unless the user has even ram cookies switched off,
but then there is no session in the ASP sense.]
I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.

can someone help me figure out what might have happened so i can
correct it?
Either you made a programming error,
[like counting from zero, and later from one],
or someone is making use of your unsafe programming.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 27 '08 #3
"Mangler" <we*******@repairresource.comwrote in message
news:1b**********************************@34g2000h sf.googlegroups.com...
Here is the process on the site before I ask the question:

User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record

I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.

can someone help me figure out what might have happened so i can
correct it?
If you are using hidden fields and it sounds like you are, could it be that
one user is receiving a cached version of another users form? IOW is there
a proxy server that is common to both users?
Jun 27 '08 #4
On May 29, 5:54*pm, "Anthony Jones" <A...@yadayadayada.comwrote:
"Mangler" <webmas...@repairresource.comwrote in message

news:1b**********************************@34g2000h sf.googlegroups.com...


Here is the process on the site before I ask the question:
User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record
I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). *mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.
can someone help me figure out what might have happened so i can
correct it?

If you are using hidden fields and it sounds like you are, could it be that
one user is receiving a cached version of another users form? *IOW is there
a proxy server that is common to both users?- Hide quoted text -

- Show quoted text -
i am using a hidden field and am not sure if there is a cached version
of another users form. i tested it myself on my PC which no one else
uses and here is what happend. Mike edited something and it recorded
Scots userid, then i edited something and it recorded mikes userid.
is that the cached form your talking about? If so, how can i prevent
this?
Jun 27 '08 #5
On May 30, 8:16*am, Mangler <webmas...@repairresource.comwrote:
On May 29, 5:54*pm, "Anthony Jones" <A...@yadayadayada.comwrote:


"Mangler" <webmas...@repairresource.comwrote in message
news:1b**********************************@34g2000h sf.googlegroups.com...
Here is the process on the site before I ask the question:
User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record
I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). *mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.
can someone help me figure out what might have happened so i can
correct it?
If you are using hidden fields and it sounds like you are, could it be that
one user is receiving a cached version of another users form? *IOW is there
a proxy server that is common to both users?- Hide quoted text -
- Show quoted text -

i am using a hidden field and am not sure if there is a cached version
of another users form. *i tested it myself on my PC which no one else
uses and here is what happend. *Mike edited something and it recorded
Scots userid, then i edited something and it recorded mikes userid.
is that the cached form your talking about? *If so, how can i prevent
this?- Hide quoted text -

- Show quoted text -
Ok i figured out what is going on but am not sure how to correct it.
I logged in several different times under different people and went to
the page to do an edit. the hidden field is always holding the userid
of the last person that went there. Any suggestions on how to prevent
this?
Jun 27 '08 #6
On May 29, 5:54*pm, "Anthony Jones" <A...@yadayadayada.comwrote:
"Mangler" <webmas...@repairresource.comwrote in message

news:1b**********************************@34g2000h sf.googlegroups.com...


Here is the process on the site before I ask the question:
User logs in
session is created based on username and userid
user edits a record in the db
a hidden field with the userid session is inserted in the db to show
who edited the record
I had a user ( mike, id -1 ) edit a record today but the userid that
got inserted was 2 ( scott ). *mike doenst know scotts credentials and
scott has never used the PC that mike is using, matter of fact scott
hasnt even logged into the site today.
can someone help me figure out what might have happened so i can
correct it?

If you are using hidden fields and it sounds like you are, could it be that
one user is receiving a cached version of another users form? *IOW is there
a proxy server that is common to both users?- Hide quoted text -

- Show quoted text -
This is weird, it only happens on this one page. I have several other
pages that edit other parts of the DB and it has the same tracking
feature, identical the only difference being that the other pages work
fine. It even does it locally on my machine.
Jun 27 '08 #7

"Mangler" <we*******@repairresource.comwrote in message
news:8d**********************************@a1g2000h sb.googlegroups.com...
On May 30, 8:16 am, Mangler <webmas...@repairresource.comwrote:
On May 29, 5:54 pm, "Anthony Jones" <A...@yadayadayada.comwrote:
Ok i figured out what is going on but am not sure how to correct it.
I logged in several different times under different people and went to
the page to do an edit. the hidden field is always holding the userid
of the last person that went there. Any suggestions on how to prevent
this?
Tweak you program logic so that it doesn't send th last userID in the hidden
field?

--
Anthony Jones - MVP ASP/ASP.NET
Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on...
1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
3
by: VijayShankar | last post by:
Can u be more specific on your question Anyway its not like Session variables are available for sometime and not available for sometime. When your session starts it is very much available...
1
by: Ernest Forman | last post by:
How can I view the defined Session Variables in the Dotnet environment? I found the session object and it shows me the count of the number of items, but I don't see how to see the names and values...
3
by: Jeff Smythe | last post by:
I simply want to execute some code once when a new session of my ASP.NET application is started (I'm not using session state for anything else - just writing some data to a database). I thought...
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
18
by: Rippo | last post by:
Hi I am using role base forms authentication in asp.net and have come across a problem that I would like advice on. On a successful login a session variable is set to identify a user. This is...
5
by: George | last post by:
Hi, Is it possible to delay session creation in ASP.NET I want the user to browse my site without any session created (no cookies set). My pages will know that is Session = null then Session has...
2
by: Kevin Frey | last post by:
Hello, I've been reading that ASP.NET serialises (ie. processes one at a time) HTTP requests if two simultaneous requests need to access the same session state. It also makes note that ASP.NET...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.