SharePoint2010新建以及部署webpart
2013-12-13 16:00
260 查看
1. 建立类库的形式,选择framwork3.5.
2. AssemblyInfo.cs文件修改.
a.添加引用
using System.Security;
b.添加代码 [assembly:
AllowPartiallyTrustedCallers()]
3. 项目右键属性—>强命名
4. 编译通过。
5. 修改所属网站的webcofing,添加代码,例如:
<SafeControl Assembly="IISZWebPartsTest,Version=1.0.0.0, Culture=neutral, PublicKeyToken=f51c823f70de0cc1"Namespace="IISZWebPartsTest"TypeName="*"
Safe="True" />
6. 其中, Assembly 中的值可以通过 Reflector工具得到.
7. 将dll拷贝至所属网站的bin目录下 ,例如
C:\inetpub\wwwroot\wss\VirtualDirectories\1128\bin
或者也可以注册dll到gac中.(如何注册和卸载assembly)
8. 重启IIS
9. 打开网站àSite ActionsàSite SettingàWeb PartsàDocumentàNew Document
1. OK,至此,新建的WebPart已经部署好了。
2. 接下来进行显示至网站上。
3. 打开网站àSite ActionsàEdit PageàAdd a Web Part
1. 点击Add .OK.
2. AssemblyInfo.cs文件修改.
a.添加引用
using System.Security;
b.添加代码 [assembly:
AllowPartiallyTrustedCallers()]
3. 项目右键属性—>强命名
4. 编译通过。
5. 修改所属网站的webcofing,添加代码,例如:
<SafeControl Assembly="IISZWebPartsTest,Version=1.0.0.0, Culture=neutral, PublicKeyToken=f51c823f70de0cc1"Namespace="IISZWebPartsTest"TypeName="*"
Safe="True" />
6. 其中, Assembly 中的值可以通过 Reflector工具得到.
7. 将dll拷贝至所属网站的bin目录下 ,例如
C:\inetpub\wwwroot\wss\VirtualDirectories\1128\bin
或者也可以注册dll到gac中.(如何注册和卸载assembly)
8. 重启IIS
9. 打开网站àSite ActionsàSite SettingàWeb PartsàDocumentàNew Document
1. OK,至此,新建的WebPart已经部署好了。
2. 接下来进行显示至网站上。
3. 打开网站àSite ActionsàEdit PageàAdd a Web Part
1. 点击Add .OK.
相关文章推荐
- SharedObject简单使用
- 正则表达式元字符
- Cloud Foundry 中国群英会【上海站、成都站】资料宣传
- Hard 不用+号实现两个数之和 @CareerCup
- 陌生單詞記錄
- ASP.NET对HTML页面元素进行权限控制(一)
- c++ web编程:写出你的CGI程序
- MFC内部结构剖析
- Javascript闭包演示
- 域渗透命令
- PHP Magic constants
- JS语法字典---网友总结
- Android软键盘与输入框的设置
- 成功将thrift单向通信该为双向通信
- 在iOS 7中使用storyboard(part 1)
- Hadoop_MapReduce中的WordCount运行详解
- 哈希表
- 最新版的IOS真机测试教程
- 推荐几本不错的ASP.NET MVC书
- display:inline、block、inline-block三者之间的区别