调试Web Parts

from http://www.cnblogs.com/BigSeal/archive/2004/10/08/49738.html?login=1#Post

一、设置断点
1.确保项目的输出路径位于SharePoint站点的根目录下的bin文件夹内
2.把Web Part程序集注册为安全控件

二、附加ASP.NET进程
1.手动附加进程
 调试->进程->把w3wp.exe置为附加进程并选中CLR复选框
2.用启动URL并自动附加到进程
 项目属性->配置属性->调试->启动ASP.NET调试置为true,调试模式为URL,启动URL为包含Web Part 的Web Part Page。
3.打开站点的web.config文件,在<system.web> t标签中找到, <compilation batch="false"/> 标签, 把它改为
<compilation batch="false" debug="true"/>.

三、调试
  1. In the web.config file, search for the <SharePoint> tag.
  2. In the <SharePoint> tag, locate the <SafeMode MaxControls="50" CallStack="false"/> tag and change it to <SafeMode MaxControls="50" CallStack="true"/>.
  3. In the web.config file, search for the <System.Web> tag.
  4. Within the <System.Web> tag, locate the <customErrors> tag and change it to <customErrors mode="Off">.

注:如果提示信任级别不够可以把web.config中的<trust level="WSS_Mimum" originUrl="" />改为<trust level="WSS_Medium" originUrl="" />

posted @ 2008-04-23 22:21  彷徨......  阅读(200)  评论(0编辑  收藏  举报