zoukankan      html  css  js  c++  java
  • 将你的Asp.NET应用程序嵌入到SharePoint 读后感[转]

    感觉不错,就转过来了。
    这种方式开发比较方便,不过有一个大问题就是失去了Sharepoint的特色,不能定制自己的portal了,还是开发webpart比较正规一点:)

    以下转自:http://hi.baidu.com/hunterzou/blog/item/ef002bb10f4fc75008230225.html

    第一点:将生成的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是用户控件所在的文档库

  • 相关阅读:
    ti processor sdk linux am335x evm setup.sh hacking
    ti processor sdk linux am335x evm Makefile hacking
    导出Excel数据
    使用dom4j解析XML例子
    java解析xml文件并输出
    java解析xml文件
    java解析XML获取城市代码
    drop.delete.trauncat的区别
    hibernate 中id生成策略
    如何使java中double类型不以科学计数法表示
  • 原文地址:https://www.cnblogs.com/IsNull/p/1701594.html
Copyright © 2011-2022 走看看