zoukankan      html  css  js  c++  java
  • Trying to use an SPWeb object that has been closed or disposed and is no longer valid.

    image

    如上图所示,如果你的页面出现这样的Error时,请检查你的程序中,是否出现了类似一下的代码块:

    Trying to use an SPWeb object that has been closed or disposed and is no longer valid.

    在以上代码中,可以看到

    TestFunction1和TestFunction2中获取SPSite的的方式是:SPSite site =SPContext.Current.Site,这样以来,在程序执行中,TestFunction2中的site释放后,TestFunction1中后续代码在调用site信息,就会找不到site,因为它已经被释放掉了,所以会出以上问题。

    所以代码可改为:

    The great code

    这样,问题便解决啦。

  • 相关阅读:
    Alluxio部署(local模式)
    spring boot热部署
    zeppelin部署
    hbase集群搭建
    spark集群模式
    spark单机模式
    ssh免密码登录配置
    error: not found: value sc
    sublime插件
    sublime和webstorm安装zencoding
  • 原文地址:https://www.cnblogs.com/qixing_gan/p/2981727.html
Copyright © 2011-2022 走看看