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.InternalSubStringWith
System.String.Substring(Int32 startIndex) +17
NotesFor.Gallery.AddFileRecursively
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.ReflectProper
NotesFor.ScriptDescriptorHelper.Get
NotesFor.Gallery.System.Web.UI.IScr
System.Web.UI.ScriptControlManager.
System.Web.UI.ScriptManager.Registe
NotesFor.Gallery.OnPreRender(EventA
System.Web.UI.Control.PreRenderRecu
System.Web.UI.Control.PreRenderRecu
System.Web.UI.Control.PreRenderRecu
System.Web.UI.Control.PreRenderRecu
System.Web.UI.Control.PreRenderRecu
System.Web.UI.Page.ProcessRequestMa
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 </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.