Server Error in '/' Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 661:
Line 662:                    if (Keywords.Length >= 160)
Line 663:                    { Keywords = Title.Substring(0, 160); }
Line 664:
Line 665:                    Page.Title = Title;

Source File: c:\inetpub\vhosts\avegs.com\httpdocs\tr\GenelSayfa.ascx.cs    Line: 663

Stack Trace:


[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +13026031
   GenelSayfa.KayitCek(String KayitNo, String Sayfa) in c:\inetpub\vhosts\avegs.com\httpdocs\tr\GenelSayfa.ascx.cs:663
   GenelSayfa.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\avegs.com\httpdocs\tr\GenelSayfa.ascx.cs:105
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0