研究SharePoint下的开发,也就难免经常会碰到出现错误的情况,例如:

很显然,这样的错误提示除了会让人抓狂之外对解决问题没有任何帮助,弄过ASP.NET的朋友们都应该想到了修改站点的web.config文件来解决网站相关的问题,对于SharePoint站点这个方法同样适用。具体的步骤如下:
(1)找到SharePoint网站对应的web.config文件,其位于如下的目录(X为系统盘盘符,nnnn为网站端口号):X:\Inetpub\wwwroot\wss\VirtualDirectories\nnnn\
(2)在web.config文件中搜索如下内容:
<SharePoint>
<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
<PageParserPaths>
</PageParserPaths>
</SafeMode>
然后将CallStack和AllowPageLevelTrace的属性设置为“true”。
(3)在web.config文件中搜索如下内容:
<customErrors mode="On" />
将其改为:
<customErrors mode="Off" />
(4)保存web.config,大功告成。
搞定之后,错误信息就是这样的,顺眼多了吧?


很显然,这样的错误提示除了会让人抓狂之外对解决问题没有任何帮助,弄过ASP.NET的朋友们都应该想到了修改站点的web.config文件来解决网站相关的问题,对于SharePoint站点这个方法同样适用。具体的步骤如下:
(1)找到SharePoint网站对应的web.config文件,其位于如下的目录(X为系统盘盘符,nnnn为网站端口号):X:\Inetpub\wwwroot\wss\VirtualDirectories\nnnn\
(2)在web.config文件中搜索如下内容:






(3)在web.config文件中搜索如下内容:




搞定之后,错误信息就是这样的,顺眼多了吧?
