Solved

Index and length must refer to a location within the string. Parameter name: length

Posted on 2014-02-14
2
978 Views
Last Modified: 2014-03-11
Hi experts,
I am trying to figure out an old survey website that sends mass email to end users tu submit a survey

I am guessing the database generates itself some kind of webId.
I entered a test user to see if i can receive a generated webid generated in a link but it didn't generate.
 
Any sugggestion on how are such fields generated.

here is how the data looks on the database, so i guess, it is generated automatically somehow.

uJbjjJdQ6UnmENZgluvHL78gU

I tried to send an email to myself without a generated webID and this is the error i received.


Exception Details: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length

+ webid.Substring(0, 4)
0
Comment
Question by:shpresa
2 Comments
 
LVL 16

Assisted Solution

by:Surendra Nath
Surendra Nath earned 250 total points
Comment Utility
there are various ways these random ID numbers are generated...

but one of the most common way is to use GUID....
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 250 total points
Comment Utility
The fact your code appears to be trying to retrieve the first 4 characters of the webid might suggest it isn't a simple GUID, but rather some encoded information. I would guess the id is being generated in your code somewhere.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now