Discuz!NT 2.5 正式版 下载
beta、RC版升级补丁
Comsenz 招聘信息
首届Discuz!NT 模板大赛圆满结束
著名音乐网站SoGua网、分贝网
采用Discuz!NT搭建社区
FIFA Online2官网论坛使用Discuz!NT
游戏城寨论坛使用Discuz!NT搭建
第二届优秀版主评选揭晓
Discuz!NT 2.5正式开源 Discuz!NT文档中心
用户整合说明文档
Discuz!NT亮相微软Tech-Ed 2007
Discuz!NT情景搞笑短片抢先看
1/2页12 跳转到查看:3245
发新话题 回复该主题

修改模板文件之后出现运行时错误

修改模板文件之后出现运行时错误

修改模板文件之后出现运行时错误,麻烦帮助解决一下,谢谢!“/”应用程序中的服务器错误。 运行时错误 说明: 服务器上出现应用程序错误。此应用程序的当前自定义错误设置禁止远程查看应用程序错误的详细信息(出于安全原因)。但可以通过在本地服务器计算机上运行的浏览器查看。

详细信息: 若要使他人能够在远程计算机上查看此特定错误信息的详细信息,请在位于当前 Web 应用程序根目录下的“web.config”配置文件中创建一个 <customErrors> 标记。然后应将此 <customErrors> 标记的“mode”属性设置为“Off”。

<!-- Web.Config 配置文件 --><configuration>    <system.web>        <customErrors mode="Off"/>    </system.web></configuration>

注释: 通过修改应用程序的 <customErrors> 配置标记的“defaultRedirect”属性,使之指向自定义错误页的 URL,可以用自定义错误页替换所看到的当前错误页。

<!-- Web.Config 配置文件 --><configuration>    <system.web>        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>    </system.web></configuration>

TOP

 

我的也出现了这个问题,不过有详细错误!

在别的机器上没问题,但是在我的机器上有问题,也把cookie清除了


Server Error in '/' Application. Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
  <system.web>
      <compilation debug="true"/>
  </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]  Discuz.Forum.BasePage..ctor() +3383  Discuz.ForumPage.index..ctor() +75  ASP.aspx_1_index_aspx..ctor() +10  __ASP.FastObjectFactory_app_web_index_aspx_e804085e_3hz3ljlm.Create_ASP_aspx_1_index_aspx() +20  System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49  System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +115  System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31  System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40  System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139  System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

TOP

 

回复:修改模板文件之后出现运行时错误

我也出现了同样的问题,是在删除模板之后出现的
怎么办阿?
在彪悍的人生里,每天都与与贪婪和恐惧博弈!
大家有问题可以联系我,尽量帮忙!Q:2184860

TOP

 

回复:修改模板文件之后出现运行时错误

有没有人帮忙啊?
在彪悍的人生里,每天都与与贪婪和恐惧博弈!
大家有问题可以联系我,尽量帮忙!Q:2184860

TOP

 

回复:修改模板文件之后出现运行时错误

找到论坛的config目录修改目录中general.config文件中<Templateid>节点,将节点中的ID修改为数据库中存在的正确的模板块ID试试
回归平凡http://www.lufei.org ……

TOP

 

回复:修改模板文件之后出现运行时错误

如果出现这个问题是 因为你删除了模板,但本地cookie中记录的还是你原来模板的信息,
这样在加载的时候就会出现一些问题, 解决办法就是清空本地cookies 。
另外 如果清空cookies 无效,请尝重启一下站点或者iis,刷新一下配置看看
看到的去帮我点那个google广告啊www.cnblogs.com/zjneter

TOP

 

回复: 修改模板文件之后出现运行时错误



引用:
原帖由 戏水 于 2007-6-12 13:480 发表
如果出现这个问题是 因为你删除了模板,但本地cookie中记录的还是你原来模板的信息,
这样在加载的时候就会出现一些问题, 解决办法就是清空本地cookies 。
另外 如果清空cookies 无效,请尝重启一下站点或者iis,......


这个问题建议DNT在系统自动判断,如果模板找不到,就用系统默认模板。

如果让普通用户来清空cookie或者删除相应cookie还是比较麻烦的。
闲蛋一个...

TOP

 

回复:修改模板文件之后出现运行时错误

bighead  和戏水老大说的都很有道理
我去再测试一下看看
在彪悍的人生里,每天都与与贪婪和恐惧博弈!
大家有问题可以联系我,尽量帮忙!Q:2184860

TOP

 

回复:修改模板文件之后出现运行时错误

问题肯定出在模板被删除的问题上
在彪悍的人生里,每天都与与贪婪和恐惧博弈!
大家有问题可以联系我,尽量帮忙!Q:2184860

TOP

 

回复:修改模板文件之后出现运行时错误

找到论坛的config目录修改目录中general.config文件中<Templateid>节点,将节点中的ID修改为数据库中存在的正确的模板块ID试试

这个问题说来奇妙,我修改站点根目录的web.config文件 ,保存后就好使了!

前提是我按照老大的说法,把默认模板修改为了ID是1的模板!

之后又在sql数据库中修改了模板数据表被我删除的ID字段

总之一顿倒来倒去 总算是好了

asp.net还是很复杂的
在彪悍的人生里,每天都与与贪婪和恐惧博弈!
大家有问题可以联系我,尽量帮忙!Q:2184860

TOP

 
1/2页12 跳转到
发表新主题 回复该主题