SharePoint - 发生意外错误
在 SharePoint 中,当我转到新的 Web 部件页面时,我收到以下信息:
错误
发生意外错误。
Web 部件维护页面:如果您有权限,可以使用此页面暂时关闭 Web 部件或删除个人设置。有关详细信息,请联系您的站点管理员。 解决 Windows SharePoint Services 问题。
我已尝试以下操作来获取更有用的错误消息:
在 web.config 中,我有:
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">
并且
<customErrors mode=“Off“/>
我已将以下内容添加到布局文件夹中的 web.config 中
<SharePoint>
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false" />
</SharePoint>
我还能做什么来查看堆栈跟踪?
In SharePoint I am getting the following when I go to my new web part page:
Error
An unexpected error has occurred.
Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Windows SharePoint Services.
I have tried the following to get a more useful error message:
In web.config I have:
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">
and
<customErrors mode=“Off“/>
I have added the following to my web.config in my layout folder
<SharePoint>
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false" />
</SharePoint>
What else can I do see a stack trace?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果您想知道确切的错误描述是什么,则需要在 SharePoint Web 应用程序
web.config
文件中进行以下更改。CallStack="false"
更改为CallStack="true"
更改为保存并从命令行执行 IISRESET 。
再次打开页面,您将得到确切的错误。
If you would like to know what exact error description is, then you need to make following changes in your SharePoint web application
web.config
file.CallStack="false"
changed toCallStack="true"
<customErrors mode="On" />
changed to<customErrors mode="Off" />
Save it and do IISRESET from command line.
Open Page again then you will get exact error.
您检查过 SharePoint 日志文件吗?
Have you checked the SharePoint Log files?
尝试设置
web.config 中的
Try setting
in web.config
您可以尝试使用 Try Catch 块包装您的 WebPart 代码。看起来有些异常没有被捕获。
You can try to wrap your WebPart code with the Try Catch Block. Looks like some exception is left uncaught.
可能是具有已编译的 Webpart 代码的 .dll 未复制到 bin/GAC 目录。
接下来我要做的是检查 Web 部件是否位于网站/网站集 Web 部件库
hth中
it might be that the .dll that has the compiled webpart code is not copied to bin/GAC directory.
next thing I would do is to check whether the web part is in site/site collection web part gallery
hth