当反复访问某个页面时,会出现很长时间都无法打开页面的现象(刚开始访问时正常)。进行跟踪,出现如下提示:
Exception has been thrown by the target of an invocation.
  at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
  at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o, MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType, IReflect objIReflect)
  at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
  at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
  at pds.mod_class.fun_set_DataGrid_or_table(Object strsql, Object& pdstable, Object getwidth) in C:\Inetpub\wwwroot\pds\Mod_class.vb:line 59
  at pds.staff_main.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\pds\info_admin\staff_main.aspx.vb:line 143
  at System.Web.UI.Control.OnLoad(EventArgs e)
  at System.Web.UI.Control.LoadRecursive()
  at System.Web.UI.Page.ProcessRequestMain()请给予指导。

解决方案 »

  1.   

    你是不是用到数据库了,如果数据库没问题,那看看你的IIS吧.
    重启IIS试试
      

  2.   

    把你操作datagrid的代码贴出来.
      

  3.   

    是用到了数据库。重启IIS后,就好啦。但过一段时间还会出现这种问题。
      

  4.   


    Public Function fun_set_DataGrid_or_table(ByVal strsql, ByRef pdstable, ByVal getwidth) As Integer
            Dim myDataSet As DataSet
            fun_dbset(strsql, myDataSet)
            If pdstable.GetType.Name = "DataGrid" Then
                pdstable.DataSource = myDataSet
                pdstable.datamember = db_table
                pdstable.DataBind()
            End If
            SetGrid_or_table_Width(pdstable, myDataSet, getwidth)
            Return myDataSet.Tables(db_table).Rows.Count()
        End Function    Public Function fun_set_search_DataGrid_or_table(ByVal strsql, ByRef pdstable, ByVal getwidth, ByVal row_count) As Integer
            Dim myDataSet As DataSet
            fun_dbset(strsql, myDataSet)
            If pdstable.GetType.Name = "DataGrid" Then
                pdstable.DataSource = myDataSet
                pdstable.datamember = db_table
                pdstable.DataBind()
            End If
            Return Set_Search_Grid_or_table_Width(pdstable, myDataSet, getwidth, row_count)
            'Return myDataSet.Tables(db_table).Rows.Count()
        End Function