Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

system.argumentoutofrangeexception:startindex cannot be less than zero. + notesfor.gallery

$
0
0

I'm having a problem with the NotesFor.Gallery assembly whenever I host it in the iis7 server. In dev machine and ii6 server it runs smoothly.

It gives the following error: 

StartIndex cannot be less than zero.
Parameter name: startIndex


Stack Trace:

[ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7495151
System.String.Substring(Int32 startIndex) +17
NotesFor.Gallery.AddFileRecursively(List`1 fileNames, DirectoryInfo directory, Boolean recursive) +224
NotesFor.Gallery.get_Files() +132

[TargetInvocationException: Property accessor 'Files' on object 'NotesFor.Gallery' threw the following exception:'StartIndex cannot be less than zero.
Parameter name: startIndex']
System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +390
NotesFor.ScriptDescriptorHelper.GetScriptDescriptors(Control control) +195
NotesFor.Gallery.System.Web.UI.IScriptControl.GetScriptDescriptors() +32
System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +98
System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +21
NotesFor.Gallery.OnPreRender(EventArgs e) +90
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Any help guys??

And my code is simple:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="gomati_gallery.aspx.vb" Inherits="gomati_gallery" %>
<%@ Register Assembly="NotesForGallery" Namespace="NotesFor" TagPrefix="ctl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<link href="style1.css" rel="stylesheet" type="text/css" />
    <title>VHND:: Gomati District Photo Gallery</title>
</head>
<body style="background-image:url(Images/wgrade.jpg);">
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <table width="100%">
        <tr>
            <td align="center">
            <img src="Images/VHND.jpg" style="width: 951px; height: 87px" />
            </td>
        </tr>
        <tr>
            <td>
            <table cellspacing="0" style="width: 100%">
            <tr>
               <td bgcolor="#f0f8ff" colspan="1" style="border-left-color: #f0f8ff; border-bottom-color: #f0f8ff;
               border-top-style: solid; border-top-color: #f0f8ff; border-right-style: solid;
               border-left-style: solid; text-align: center; border-right-color: #f0f8ff; border-bottom-style: solid; height: 12px;"
               valign="top">
               <strong><span style="font-size: 11pt">Gomati District Photo Gallery&nbsp;</span></strong></td>
           </tr>
           <tr>
                <td bgcolor="#dceaff" colspan="1" style="border-left-color: #f0f8ff; border-bottom-color: #f0f8ff;
                border-top-style: solid; border-top-color: #f0f8ff; border-right-style: solid;
                border-left-style: solid; border-right-color: #f0f8ff; border-bottom-style: solid; text-align: center;"
                valign="top">
                </td>
           </tr>
           </table>
    </td>
    </tr>
    </table>
    <ctl:Gallery runat="server" ID="Gallery1" FolderUrl="~/gomati" Size="100" />
    </div>
    </form>
</body>
</html>

No code behind whatsoever needed.


Viewing all articles
Browse latest Browse all 5678

Trending Articles