Solved

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

Posted on 2014-02-14
2
992 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
ID: 39860138
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
ID: 39864252
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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.

809 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