
C#
pclzr
这个作者很懒,什么都没留下…
展开
-
sharepoint 2007 修改用户和组 display name 和 email地址 代码
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using System.Web;using Microsoft.SharePoint.Administration;using System.IO;原创 2012-01-11 16:08:28 · 1157 阅读 · 1 评论 -
sharepoint 2007 获取所有网站集前40w个文件中启用历史版本文件的大小/数量/最后修改时间
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-08-09 14:35:31 · 670 阅读 · 0 评论 -
sharepoint 2007 为独立权限的文件夹及其子文件和文件夹设置继承权限或者添加用户
1、为所有独立权限的文件夹及其子文件和文件夹设置继承权限2、为所有独立权限的文件夹及其子文件和文件夹添加用户using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;原创 2012-06-07 18:40:54 · 2184 阅读 · 0 评论 -
sharepoint 2007 获取特定folder下文件的数量
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using System.Text.RegularExpressions;using System.IO;namespace getFileNum{原创 2012-08-31 16:10:39 · 1073 阅读 · 0 评论 -
sharepoint 2007 force close file
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-09-26 11:33:41 · 1066 阅读 · 0 评论 -
excel 将excel中行的内容创建到文本中去
Sub createFileFromExcle() Dim fs As Object 'Set fs = CreateObject("Scripting.FileSystemObject") Application.ScreenUpdating = False For i = 2 To [a65536].End(xlUp).Row Set原创 2012-09-11 11:12:55 · 647 阅读 · 1 评论 -
C#操作IIS完整解析
最近在为公司实施做了一个工具,Silverlight部署早已是轻车熟路, 但对于非技术人员来说却很是头疼的一件事,当到现场实施碰到客户情况也各不相同, 急需一个类似系统备份的"一键工具"快速实现应用程序部署和数据库进行关联. 网上关于这方面资源也比较混乱,其中对于IIS的编程影响因素很多,操作技巧上加以细化小结.A:版本问题这是你在进行编程前必须要要考虑的一个实际问题.因为IIS版本不同对转载 2012-09-14 10:51:10 · 678 阅读 · 1 评论 -
修改本机iis中所有application pool的identity(OfficeServerApplicationPool除外)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.DirectoryServices;using System.Collections;namespace ResetIISApplicationIdentity{ clas原创 2012-09-14 11:22:04 · 3262 阅读 · 1 评论 -
visual studio 2008/2010安装在vm中时,打开项目或者调试完成后会假死一段时间
仅见于内网/某些工程。原因在于内网DNS无法解析网站。而VS停止调试之后会尝试与crl.microsoft.com通信。解决方法,改Host屏蔽 0.0.0.0 crl.microsoft.com0.0.0.0 6to4.ipv6.microsoft.comUpdate:同样见与内网,停止调试还是得卡个3、4秒。。抓包分析得到停止调试之后系统会用LLMNR和B转载 2012-09-22 01:33:07 · 2050 阅读 · 6 评论 -
sharepoint 2007 获取启用特定数量历史版本文件的信息(站点/最后更新时间/author/修改者/版本数/大小)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-10-18 15:50:33 · 912 阅读 · 1 评论 -
Solving the “User cannot be found” error with SPFile.Author
I ran into a bug today that was a bit unusual. We have a custom ASP.NET page that shows information from a custom list in SharePoint 2007. That page shows details, including the Author, for attachme转载 2012-10-18 15:52:16 · 1259 阅读 · 1 评论 -
Sharepoint 2007 获取文档库history version设置信息
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-09-27 15:53:09 · 807 阅读 · 0 评论 -
Sharepoint 2007 为文档库设置历史版本数
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-12-20 23:05:33 · 589 阅读 · 0 评论 -
通过Sharepoint 发邮件
大家都知道在.net 中实现邮件的发送已经不是什么难事,但是需要配置smtp服务器。在Sharepoint这个就没有必要了,只要MOSS 或者是 WSS 3.0 配置了 Smtp,我们就可以通过以下简单的代码就能发邮件了using Microsoft.SharePoint.Utilities;SPUtility.SendEmail(SPContext.Current.Web, fa转载 2012-08-13 11:30:01 · 903 阅读 · 0 评论 -
sharepoint 2007 统计站点文档库大小(list大小可以忽略时可以当作站点大小)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-08-09 14:37:15 · 831 阅读 · 0 评论 -
sharepoint 2007 统计所有网站集中视频文件的总大小
视频文件类型为:.avi .mov .rm .rmvb .wmv .asf .asx .mpg .mpeg .3gp .mp4 .flv .mkv .vobusing System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;原创 2012-08-09 14:39:19 · 765 阅读 · 0 评论 -
SharePoint 2007中所有的Event Handlers事件清单
SharePoint 中Event handlers 有两种风格: 同步的(synchronous)和异步的(asynchronous). Synchronous events 在处理事件的时候发生, 允许开发者在必要的情况下取消掉事件.Asynchronous event handlers 跟SPS2003和WSSv2的很像.下面列出了SharePoint中所有的event转载 2012-04-19 10:35:58 · 584 阅读 · 0 评论 -
Sharepoint 2007 捞取application下所有site 和site collection的内容最后修改时间工具
需求说明:1.捞取site collection的内容最后update时间和权限最后一次update时间;2.列出site collection的administrator3、捞取site 的内容最后update时间using System;using System.Collections.Generic;using System.Linq;using Syst原创 2012-06-01 14:46:18 · 737 阅读 · 0 评论 -
SPQuery在引用field的时候要用internal name
SPQuery在引用field的时候要用internal name使用SPQuery构建CAML查询的时候, 一定要用field的internal name, 否则就会报出如下的错误:Exception caught Microsoft.SharePoint.SPException: One or more field types are not installed p转载 2012-05-17 16:22:59 · 851 阅读 · 0 评论 -
如何通过IAlertNotifyHandler来自定义Alert Email
如何通过IAlertNotifyHandler来自定义Alert Email问题描述==========自定义Alert email, 不仅仅修改外观, 我们需要对内容的输出进行控制 解决方案==========使用IAlertNotifyHandler接口来制作邮件内容, 修改邮件内容 步骤=========转载 2012-05-17 16:07:55 · 609 阅读 · 0 评论 -
C# 将listview 中的数据导出到excel 文件
//先添加一个button1,text为export to excel//添加一个saveFileDialog1,filter设置为"Excel 文件(*.xls)|*.xls"; using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;原创 2012-06-10 22:16:20 · 3568 阅读 · 0 评论 -
sharepoint SPFolder的使用
SPFolder是SharePoint对象模型中文件夹相关的类,它的使用方法相对比较简单。获取一个SPFolder的对象可以通过SPFolderCollection使用以下两种方法获得。· folders[int index]:通过文件夹集合中的下标来获得;· folders[string url]:通过该文件夹的url来获得。而SPFolderCollection对象一般可通过SPW转载 2012-05-22 17:10:20 · 2254 阅读 · 0 评论 -
SPFile的使用
SPFile对应于SharePoint对象模型中的文件,它的使用方法与SPFolder类大致相似。在获取SPFile对象的时候,仍是通过SPFileCollection来进行,形式也与获取SPFolder相同。在SPWeb中,也同样提供了SPWeb.GetFile方法来获取一个文件。· GetFile(string url):参数为该文件所在的url。此外,对于文档库列表中的列表条目来说,转载 2012-05-22 17:11:40 · 1806 阅读 · 0 评论 -
Sharepoint 2007 权限开发(二)
Sharepoint2007中的权限都是通过角色来定义的,一切权限都是通过权限来设置,在设置权限的时候,只能给用户或组赋予一个角色,而不能直接去修改他的权限。每一个能分配权限的对象(SPWeb、SPList、SPListItem)都会有一个RoleAssignments属性,它是一个SPRoleAssignmentCollection类型的属性,用于分配权限。此外,在SPWeb里还有RoleD转载 2012-05-22 18:44:26 · 842 阅读 · 0 评论 -
Sharepoint 2007 权限开发(一)
众所周知,MOSS是应用在WSS基础上的,所有针对MOSS开发难免要对WSS要有所了解,精通当然最好。在此B/S架构的软件中,权限是非常重要的一部分,在MOSS中也是如此。在MOSS中,管理权限完成是按照WSS的基本架构来处理权限的。安全授权管理由安全元素构成如下:安全元素名称拥有什么用户权限域组权限级别SharePoint组安全转载 2012-05-22 17:41:38 · 849 阅读 · 0 评论 -
sharepoint 2007 文档库编程
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts转载 2012-05-23 17:22:04 · 731 阅读 · 0 评论 -
捞取当前站点下所有权限工具代码
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using System.IO;using System.Web;原创 2012-03-30 14:56:06 · 441 阅读 · 0 评论 -
正则表达式30分钟入门教程
正则表达式30分钟入门教程<!--h1 {text-align:center}h2 {border-bottom:gray 1px solid; background-color:#eee; clear:both; border-right:gray 1px solid}p {line-height:140%; text-indent:2em转载 2012-08-07 16:59:42 · 457 阅读 · 1 评论 -
windows 8 启动自动加载VHD存储池
当对多个磁盘做了存储池后,使用diskpart命令批量加载非常缓慢,可以使用下面代码非常高效,在c盘根目录创建vhdlist.txt用来保存多个vhd文件的路径: using System;using System.Globalization;using System.Runtime.InteropServices;using System.Collections.Generi原创 2012-08-21 16:09:54 · 4563 阅读 · 0 评论