473,386 Members | 1,766 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,386 software developers and data experts.

Limit length of string on session id

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
Jul 19 '05 #1
6 5179
"Bill" wrote ...
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
Jul 19 '05 #2
I am not sure why you would want to do this...

Left(sSessionID,9)

--
Cheers!

Ryan N.
---------------------------------
Funny...this worked yesterday....
"Bill" <bi***********@gospellight.com> wrote in message
news:8d*************************@posting.google.co m...
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

Jul 19 '05 #3
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
> 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.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #5
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.

--
Cheers!

Ryan N.
---------------------------------
Funny...this worked yesterday....
"Bill" <wi************@yahoo.com> wrote in message
news:uC**************@TK2MSFTNGP10.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #6
Hex(SEssion.SessionID)

Ray at work
"Bill" <wi************@yahoo.com> wrote in message
news:uC**************@TK2MSFTNGP10.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #7

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

Similar topics

1
by: Gerard Cany | last post by:
I have a problem with a javascript that seems related to the number/size of parameters sent by the form The method for the form is POST (not GET, I know the size limit with GET) The symptom :...
2
by: SJM | last post by:
In some VBA code I am building an SQL string to append a new record to a table. The string involves 40 fields. What I am finding is that it works with 39 fields but when I add 40 it fails with the...
2
by: Tom Dacon | last post by:
I'm raising an event in a component, using ISynchronizeInvoke.Invoke, and my event args object contains a string as one of its members. If the string is longer than 63 bytes, the Invoke call pulls...
10
by: VM | last post by:
How can I limit the use of the PC's virtual memory? I'm running a process that basically takes a txt file and loads it to a datatable. The problem is that the file is over 400,000 lines long (77...
0
by: vadim | last post by:
Hi, Does anybody know if there is limit on the length of string in web.config file? I am particularly interested in appSettings section add key = key value= value, Is there limit on the value...
0
by: Burton Wilkins | last post by:
Dear Authorities: I realize that in communicating with a Web Service, one is essentially passing a string as a parameter. Is there a limit over the Internet how long a parameter string can be?...
5
by: Daniel | last post by:
c# string size limit? length of string limit?
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am thinking about doing this since I got several cases that some of our internal users open more than one browser at the same time from our server. When one of the transactions was not...
1
by: rn5a | last post by:
I am working on a database driven application wherein the SessionID gets populated in a database table column. After populatating the DB table column with several SessionIDs, I have noticed that...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.