在 SharePoint 中,当我转到我的新 Web 部件页面时,我得到以下信息:
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.
我尝试了以下方法以获得更有用的错误消息:
在 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>
我还能做什么才能看到堆栈跟踪?
最佳答案
如果您想知道确切的错误描述是什么,则需要在您的 SharePoint Web 应用程序中进行以下更改 web.config
文件。
CallStack="false"
更改为CallStack="true"
<customErrors mode="On" />
更改为<customErrors mode="Off" />
保存它并从命令行执行 IISRESET。
再次打开页面然后你会得到确切的错误。
关于SharePoint - 发生意外错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1648910/