如何在sharepoint 2007 page list 中运行 web application
- <SafeMode MaxControls="500" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
<PageParserPaths>
<PageParserPath VirtualPath="/products/Application/XRefTool/*" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
</SafeMode> - <SafeControl Src="/products/Application/XRefTool/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" />
- <SafeControl Assembly="Fastenal.FastNet.XRefTool" Namespace="Fastenal.FastNet.XRefTool" TypeName="*" Safe="True" />
- <trust level="Full" originUrl="" />
按照上述修改或添加到当前站点下的web.config。
第一项目是让sharepoint 解析你的list下的aspx页面;
第二项是为了让sharepoint 解析你的list下的ascx,这样你的页面里才能引用这个list下的user control,见 The referenced file [UserControlFile] is not allowed on this page
第三项其实就是你的web application的dll 添加到safecontrol里面了,这样才能被允许执行
第四项就是提升默认的权限了。也可以自己定制权限而不用Full.
这样,把你的web application 下的页面,脚本,图片,usercontrol,复制到page list 里就可以运行了。当然,你的web application 的web.config里的设置也要写到当前站点下的web.config里去。