查看文章
 
将你的Asp.NET应用程序嵌入到SharePoint 读后感
2008年02月19日 星期二 12:25 A.M.

第一点:将生成的dll拷贝到网站目录下bin文件夹

第二点:在网站web.config文件的<SafeControls></SafeControls>节点中添加以下(目的是把应用程序注册为安全类型)
<SafeControl Assembly="WebInMOSS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="WebInMOSS" TypeName="*" Safe="True" />
说明:其中WebInMOSS为应用程序的命名空间

第三点:删除页面的AutoEventWireup="true"属性

第四点:Web.config 文件的<SharePoint>节点,在 <PageParserPaths> </PageParserPaths>
节点下增加一个虚拟路径 <PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
声明此站点下所有文件允许服务器端事件,当然你也可以制定虚拟目录是那个文件夹,但是这个值 必须以 ~/ 或 / 开头,并且必须以文件名或 * 结尾。
(目的为允许服务器端事件的运行)

第五点:把web.config文件的enableSessionState属性设为true(如果此应用程序要使用到Session的话)
<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false"

pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,

PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">

第六点:在网站web.config文件的<SafeControls></SafeControls>节点中添加以下(目的是允许应用程序使用用户控件)
<SafeControl Src="~/Pages/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" />
说明:其中Pages是用户控件所在的文档库


类别:Moss2007||添加到搜藏 |分享到i贴吧|浏览(1115)|评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
     

   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu