工作小记

C#中使用PowerShell:
 Process process = new Process();
 // Redirect the output stream of the child process.
 process.StartInfo.UseShellExecute = true;
 process.StartInfo.FileName = "powershell";
 process.StartInfo.Arguments = @".\Build-TestSuite.ps1 " + BuildDestFolder + " " + protocol.ShortName + " " + protocol.Family;
 process.Start();
 
// Wait for exit
 process.WaitForExit();
 ----------------------------------------------------

sharepoint的数据库结构:
 Using these procedures, the DBA will create databases and the farm administrator will perform other configuration actions in the following order:
 1. · The configuration database (only one per farm).
 2. · The content database for Central Administration (only one per farm).
 3. · Central Administration Web application (only one per farm, created by Setup).
 4. · The Windows SharePoint Services search database (only one per farm).
 5. · Start the Office SharePoint Search service.
 For each portal site:
 6. · Portal site Web application content database.
 For each SSP:
 7. · A content database for the My Sites Web application (if the SSP is using its own Web application).
 8. · A content database for the Shared Services Administration Web application (if the SSP is using its own Web application).
 9. · SSP Search database (one per SSP).
 10. · SSP Web application (created by Setup if the SSP is using its own Web application).
 Note: 
As part of the Web site and application pool creation process, a Web application is also created in Internet Information Services (IIS). Extending a Web application will create an additional Web site in IIS, but not an additional application pool.
 
private bool ExtractCabinet()
 {
 bool extractStatus = false;
 
try
 {
 System.Diagnostics.Process extractor = new System.Diagnostics.Process();
 extractor.StartInfo.UseShellExecute = true;
 extractor.StartInfo.CreateNoWindow = true;
 extractor.StartInfo.WorkingDirectory = Directory.GetCurrentDirectory();
 extractor.StartInfo.FileName = "extrac32.exe";
 extractor.StartInfo.Arguments = "/e /l " + this.targetLocation + " " + this.parserLocation + "dp.cab";
 
if (extractor.Start())
 extractStatus = true;
 }
 catch (Exception)
 { }
 
return extractStatus;
 }
 -------------------------------

Sharepoint 的dll在:
 C:\program files\common files\microsoft shared\web server extensions\12\isapi
 ------------------------

Workflow 指的是“工作流(Workflow)就是“业务过程的部分或整体在计算机应用环境下的自动化”,它主要解决的是“使在多个参与者之间按照某种预定义的规则传递文档、信息或任务的过程自动进行,从而实现某个预期的业务目标,或者促使此目标的实现”。
 
http://tech.ddvip.com/2009-11/1257623583137772.html
 

-----------------------------------
Create and Publish web pages in Publishing SharePoint sites programmatically
 using (SPSite site = new SPSite("http://moss"))
 {
 using (SPWeb web = site.OpenWeb())
 {
 PublishingSite pSite = new PublishingSite(site);
 SPContentType ctype = pSite.ContentTypes["Welcome Page"];
 PageLayoutCollection pageLayouts = pSite.GetPageLayouts(ctype, true);
 PageLayout pageLayout = pageLayouts["/_catalogs/masterpage/welcomesplash.aspx"];
 PublishingWeb pWeb = PublishingWeb.GetPublishingWeb(web);
 PublishingPageCollection pPages = pWeb.GetPublishingPages();
 PublishingPage pPage = pPages.Add("Programmatic_Test.aspx", pageLayout);
 SPListItem newpage = pPage.ListItem;
 newpage["Title"] = "Page added programmatically";
 newpage.Update();
 
newpage.File.CheckIn("all looks good");
 newpage.File.Publish("all looks good");
 }
 }
 -----------------------------
用code判断一个webservice是否是正确的:
 利用 HttpWebRequest.GetResponse() 后检查其 StatusCode,不大于 400 则可判断此 URL 服务有效。 try {
 // Create a web request for an invalid site. Substitute the "invalid site" strong in the Create call with a invalid name.
 HttpWebRequest myHttpWebRequest = (HttpWebRequest) WebRequest.Create("invalid site");
 
// Get the associated response for the above request.
 HttpWebResponse myHttpWebResponse = (HttpWebResponse) myHttpWebRequest.GetResponse();
 myHttpWebResponse.Close();
 }
 catch(WebException e) {
 Console.WriteLine("This program is expected to throw WebException on successful run."+
 "\n\nException Message :" + e.Message);
 if(e.Status == WebExceptionStatus.ProtocolError) {
 Console.WriteLine("Status Code : {0}", ((HttpWebResponse)e.Response).StatusCode);
 Console.WriteLine("Status Description : {0}", ((HttpWebResponse)e.Response).StatusDescription);
 
}
 

 ----------------------------------

查看sharepoint的log:
 Central Administration > Operations > Diagnostic Logging

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS
 

------------------------------
Sharepoiont designer 2007 对应server 2007
 2010 对应10
 
-----------------------------
 
多线程debug:
 http://channel9.msdn.com/posts/DanielMoth/Multi-threading-Debugging-Enhancements-in-Visual-Studio-2008/
 
debug—>windowsàthread
 

------------------------------
adding an extra server to an existing sharepoint farm:
 http://sharepointnotes.wordpress.com/2008/01/10/adding-an-extra-server-to-an-existing-sharepoint-farm/
 Install MOSS and join the server to the existing farm
 1.Install using the MOSS installation account
 2.Start MOSS Setup, enter your license key and accept the license agreement
3.Select Advanced and Complete install
 4.Run the SharePoint Product and Technologies Configuration Wizard 
5.Connect to an existing farm
 6.Enter the MOSS database server end click Retrieve Database Names. The Database Name and Username fields are automatically populated. Enter the password and click Next 
7.In Advanced Setting make sure that this server will not host the Central Administration site and click Next
 8. That’s it. The new server is now member of the farm. Use Central Administration to configure it for the purpose it is intended (Web Front-end, indexing etc)

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yjf512/archive/2010/02/24/5321839.aspx

时间: 2024-07-28 17:51:56

工作小记的相关文章

工作小记(一)----面试总结

       转眼间出来工作已经四天了,上周五接到的电话,让准备准备,周一去面试,看了看之前他们的面试题,问了问他们之前面过试的人都有哪些需要注意的,周一就匆匆忙忙的去了,这一路,对自己能够面上的期待,对面不上的忐忑,就这么纠结着去面试.        大概是八点多到的吧,面试么,觉得是一件很严肃的事情,于是就穿的正式了一点,晒两张照片给你们瞅瞅. (默默的问一句,谁的PS技术高,帮我把第二张照片中的光哥P掉~!~)        到了之后,找人带着到了面试的地方,开始面试,面试首先自我介绍,然

工作小记(三)----说说北京生活的乐趣

    对于来北京是充满了期待的,终于来到了首都,这个将来我会在这打拼一段时间的地方.     首先想说的是,北京很大,真的很大:在廊坊的时候,从东园到西院,骑车10分钟左右的路程,都觉得远,当来到北京之后,才发现,原来这么点距离其实真的不远:在北京工作的人,大部分人住的地方都在四环开外,每天上下班挤公交,导地铁,这一下来1,2个小时就没了,走路二十分钟的路程真真的不远.     刚去公司的时候,偶尔有人会问,你们工作几年了,我们就说我们有三年工作经验:然后人家就说看着你们好年轻啊~看着这么向学

工作小记(五)----完工归来

交流很重要 管理经验 作为管理者   把控全局   要有担当 作为员工   执行力   多和管理者交流   以管理者的身份去思考问题 时间管理 生活 结语     经历了四个月的奋斗,项目成功的做完了一个版本,前台的开发也算告一段落了,要是继续开发的话,必须得有设备的支持,设备什么时候能来也不清楚,我们没什么任务了,就从公司里撤回来了.下面跟大家分享下这四个月的工作感受! 交流很重要     会交流真的很重要,较好的表达能力也是一个人的财富,而人与人之间交流思想,沟通感情最直接.最方便的途径就是

工作小记(二)----说说烦心事

        出来工作快有三个月了吧,7月底出来的,到现在:刚来上班的时候,赶上项目紧张,每天加班到晚上8点,大概加了有一个月的时间:后来招标方过来交流,因为这边没有做过类似的集成类的安防平台系统,招标方说不敢用,毕竟这关系着成千上万的人的安全.就这样,系统的主要开发方交给了宇视去做,我们做的系统算是被人家给终结了,庆幸的一点是从此就再也没怎么加过班,有更多的时间可以去学习.         也是有点小失落,其实这个地铁类的项目很有前途,主要的就是和仪器.设备打交道,从来没有做过类似的系统,当

工作小记(四)----何为优秀?

    大学四年已经离我们远去,我们也成了真真正正的社会人,即将步入职场,开始为自己的生活打拼,为自己的未来打拼.     毕业了,同班同学,宿舍的哥们,还有认识的一些朋友们,各自在自己的岗位上忙碌着,挣得钱不多,一个月3,4千,也算不错:有那么几个要好的,打过电话,对自己现在的生活也很无奈,打了会儿电话,叹气叹了半天,我说实在不行就换一家,他说看看再说吧,谁愿意老折腾,谁不想稳定,先呆一段时间涨涨经验.我想这种事情在大学毕业之后肯定很常见!     也不知道从什么时候起,我就开始起经常的反思自

部署流水线搭建小记:Docker、Jenkins、Java和Couchbase

本文讲的是部署流水线搭建小记:Docker.Jenkins.Java和Couchbase[编者的话]这篇文章讲述了如何用Jenkins和Docker来为一个需要和数据库交互的Java应用创建部署流水线(deployment pipeline). Jenkins支持创建流水线.它使用一种基于Groovy的流水线领域特定语言(Pipeline DSL)的简单脚. 而这些脚本,通常名字叫Jenkinsfile.它定义了一些根据指定参数执行简单或复杂的任务的步骤.流水线创建好后,可以用来构建代码,或者编

【转】 Scrum 过程实践小记

严格来说,不能算是真正的scrum实践,但实践敏捷的过程本身也是一种"敏捷方法",所以就算是"敏捷实践之敏捷开发方法-scrum过程"吧. 一.理论参考:Scrum的实践(该部分摘自网络) 1.Scrum团队(5-7个人的小项目组). 2. Backlog: 急待完成的一系列任务,包括:未细化的产品功能要求.Bugs.缺陷.用户提出的改进.具竞争力的功能及技术升级等,按优先级定义出来,这些任务可能不是完整的,甚至可能随时会更改或添加. 3. Sprint(冲刺):

路由器QOS功能原理和工作方式

设置路由器时,大多会用到路由器的安全机制,也就常说的QOS功能,QOS功能可以保护整个网络的安全,本篇带你了解其具体的原理和工作的方式. 一.QOS用来解决带宽解决网络延迟和阻塞等问题的一种技术,一般里面包含优先级别.弹性带宽管理等等,主要用来解决各种网络的攻击和病毒,保护网络的正常运行,它主要有以下几个方面的功能: 1.端口优先:可针对源端口.目的端口进行设置优先的级别,一般来说如果是玩游戏为主.那么我可以针对一些主流游戏的端口.优先这些游戏的带宽. 2.IP/网段优先:可针对源IP.目的IP

使用Putty的Telnet及SSH功能进行相关工作

说实话,我不习惯命令行的操作.但是有些工作必须要使用命令行才能完成操作.比如公司的网络设备,都是通过命令行. 唉,没有办法只能去适应了.先来说说Telnet吧.以前我认为Telnet因为是明文的方式进行传输,在实际工作中使用的比较少.但是目前看来我错了,而且错的很离谱呢. 公司很多的管理都是通过Telnet进行的. 除此之外,还有SSH.这个我还是知道的.相对于Telnet来说,SSH还是很安全的. 平时使用Telnet时,要么是使用本机自带的Telnet客户端.操作起来还行,但是前提是本机一定