ERROR: startIndex cannot be larger then length of strin. Parameter name: startIndex


Good afternoon,
Encountered and Error:
  1. I just installed MSCRM Map Editor v1.0.0.0.
  2. Ran MapEditor.exe.
  3. On the Config Details screen, I clicked the NEXT button.
  4. Prompted whether I want to save the value for future use. I clicked YES button.
    I had error (see below). I tried it multiple times but I keep on getting the same error. HOWEVER, when I select NO button it continued.
    If I select NO. It proceeds but gives me Error 'Metadata could not be loaded for following reason. "The request failed with HTTP status 401: Unauthorized."' but I am sure that the values I entered were correct.
  5. I am using MS CRM 4.0 Base VPC downloaded from MS Site.
  6. Mode = "Server"
  7. Server Domain and User Domain has the same value = "LITWAREINC"
  8. Server Name = "MOSS"
  9. RootUrl = " MOSS:5555" or "Localhost:5555" error is 401
  10. RootUrl = " MOSS" or "Localhost" error is 404
  11. Organization Name = "MicrosoftCRM" or "Microsoft CRM"
  12. User Name = "Administratror"
    NOTE: The only time it proceeds to the Manage Maps screen is if the Server Domain and User Domain has "LITWAREC" value. But I can't see the other Maps I created using DMM.
    What could be the problem? Thanks...


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex)
at MapEditor.MapEditorConfig.updateConfigFile()
at MapEditor.MapEditorConfig.updateConfig(String serverDomainParam, String serverNameParam, String rootUrlParam, String userDomainParam, String userNameParam, String organizationNameParam, String usageModeParam)
at MapEditor.MapEditorWizard.ConfigDetailsNextButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

Assembly Version:
Win32 Version:

CodeBase: file:///C:/Setup/Microsoft%20Dynamics%20CRM%204.0%20Data%20Migration%20Map%20Editor/Version%201.0/ToolBinaryRelease1.0/Release/MapEditor.exe

Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/

Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/

Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/

Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/

Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/

Assembly Version:
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
For example:
<system.windows.forms jitDebugging="true" />
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


midnightoil wrote Sep 25, 2008 at 10:18 PM

Try directly put the values into the MapEditor.config and save. Then run the program. It worked for me this way.

Good luck.


wrote May 13, 2009 at 2:22 PM

wrote Feb 13, 2013 at 6:10 PM