Limit length of string on session id

B

Bill

I currently have a program that crashes if the sessionid is longer
than 9 digits. Is there a way to trim the length of the string that
IIS kicks out and limit it to 9 digits, or if that can't be done, is
there a function I can use to trim the 10 digit string down to 9
digits?

Thanks,

Bill
 
R

Rob Meade

...
I currently have a program that crashes if the sessionid is longer
than 9 digits. Is there a way to trim the length of the string that
IIS kicks out and limit it to 9 digits, or if that can't be done, is
there a function I can use to trim the 10 digit string down to 9
digits?

Wouldn't that then kinda make the id useless?

Regards

Rob
 
B

Bill

Why would a 9 digit id be useless? In fact, most of the time, it does
kick out a 9 digit id. But the software this interfaces with has a limit
of 9 digits the string can be, so it has to be trimmed if it is over
nine.

What I would like to know if is there is a way to configure IIS to limit
the size to 9 digits.

Bill
 
A

Aaron Bertrand - MVP

Why would a 9 digit id be useless? In fact, most of the time, it does
kick out a 9 digit id.

That wasn't his point. Let's say you have these two users:

sessionID = 1234567890
sessionID = 234567890

When you trim the guy with 10 to fit your "9-digit software," these two
users suddenly look the same.

How about instead of relying on IIS's session ID scheme, you roll your own.
 
R

Ryan N.

Bill,
Why are you storing the ID gen'd by IIS? At least in IIS 5.0 (perhaps this
has changed in IIS 6.0...I will have to check the docs) there is no
guarantee of a unique ID from one session to the next.
 

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
474,145
Messages
2,570,825
Members
47,371
Latest member
Brkaa

Latest Threads

Top