移动IIS网站后如何解决错误

我对将网站从一个ISS迁移到另一个ISS以及随之而来的错误有疑问。 当我将新网站添加为类似于旧情况的应用程序时,打开该网站时会收到以下错误消息。

我不知道如何解决此问题,我在google和其他内容上查找它,但是我的nowles编码是我朝正确方向迈出的重要一步。所以我希望你们中的一些人可以帮助我完成这项工作。

我得到的代码是:

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[IndexOutOfRangeException: Index was outside the bounds of the array.]
   Incidentensysteem.Index.Page_Load(Object sender,EventArgs e) in C:\Users\Michel\Documents\Incidentensysteem\Incidentensysteem\Index.aspx.cs:32
   system.web.UI.Control.OnLoad(EventArgs e) +106
   system.web.UI.Control.LoadRecursive() +68
   system.web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) +3785



Version Information: microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0


**Full Code:**
namespace Incidentensysteem
{
    public partial class Index : system.web.UI.Page
    {
        private Klant klant;
        private string medewerkerNaam;

        protected void Page_Load(object sender,EventArgs e)
        {
            string datumString = "2000-01-01";
            //string datumString = datum.Year + "-" + datum.Month + "-" + datum.Day;
            if (ObjectDataSource3.SelectParameters.Contains(ObjectDataSource3.SelectParameters["Datum"]))
            {
                ObjectDataSource3.SelectParameters["Datum"].Defaultvalue = datumString;

            }
            if (ObjectDataSource4.SelectParameters.Contains(ObjectDataSource4.SelectParameters["Datum"]))
                ObjectDataSource4.SelectParameters["Datum"].Defaultvalue = datumString;

            //Random random = new Random();
            //LabelIncidentZoeken.Text = random.Next().ToString();
            this.klant = null;
            string v = medewerkerNaam = Request.ServerVariables["AUTH_USER"].Split('\\')[1];
            //this.medewerkerNaam = "Michel";
            if (Request.QueryString.Count > 0)
            {
                ObjectDataSource2.SelectParameters["Klant_ID"].Defaultvalue = Request.QueryString[0];
                ObjectDataSource2.DataBind();
                ObjectDataSource3.SelectParameters["Klant_ID"].Defaultvalue = Request.QueryString[0];
                ObjectDataSource3.DataBind();
                ObjectDataSource4.SelectParameters["Klant_ID"].Defaultvalue = Request.QueryString[0];
                ObjectDataSource4.DataBind();
                ObjectDataSource5.SelectParameters["Klant_ID"].Defaultvalue = Request.QueryString[0];
                ObjectDataSource5.DataBind();
                showControls();
            }
            if (TextBoxZoeken.Text.Length > 0)
                zoeken(DropDownListZoeken.SelectedValue,GridView1.SelectedIndex); 
plokmn0987 回答:移动IIS网站后如何解决错误

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3165315.html

大家都在问