置顶随笔

[置顶]SharePoint 2010版本表

描述 SharePoint Foundation KB SharePoint Server 2010 KB FAST Search Server 版本号
December 2011 CU 2597058 2597014   14.0.6114.5000
October 2011 CU 2596508 2596505   14.0.6112.5000
August 2011 CU 2553050 2553048 2553040 14.0.6109.5002
June 2011 CU 2536591 2536599   14.0.6106.5000
Service Pack 1

2460058

2460045

  14.0.6029.1000
April 2011 CU KB 2512804 KB 2512800   14.0.5138.5001
February 2011 CU 2475880 2475878   14.0.5136.5002
December 2010 CU 2459125 2459257   14.0000.5130.5002
October 2010 CU KB2394323 KB2394320   14.0.5128.5000
August 2010 CU KB2352346

KB2352342

  14.0.5123.5000
June 2010 CU KB 2028568

KB 983497

KB 2124512

KB 2182938

KB 2204024

KB 2281364

  14.0.5114.5003
RTM       14.0.4763.1000

 

注:

RTM版中, 管理中心看到的版本号是14.0.4762.1000, 而控制面板里的版本号是14.0.4763.1000. 以后均已控制面板中的版本号为准(与KB中使用的版本号保持一致).

 

链接:

Updates for SharePoint 2010 Products

http://technet.microsoft.com/en-us/sharepoint/ff800847.aspx

SharePoint 2010 Build Numbers (Cube Sheet)

http://blogs.technet.com/b/steve_chen/archive/2010/09/29/build-numbers-cube-sheet-for-sharepoint-2010.aspx

posted @ 2010-05-11 21:41 中道学友 阅读(583) 评论(0) 编辑

[置顶]WSS3.0 和 MOSS 的版本号小结

如果你对SharePoint的版本对应那个service pack和补丁有疑惑, 这个表格也许对你有帮助.

 

在SharePoint的管理中心网站的Servers in Farm页面, 可以看到的版本号如下:

描述 WSS KB MOSS KB 版本号
December 2011 CU 2596987 2596986 12.0.6656.5001
SP3 2526305 2526299 12.0.6608.5000
October 2011 CU 2596541 2596540 12.0.6654.5000
August 2011 CU 2553022 2553020 12.0.6565.5000
June 2011 CU 2544399 2544398 12.0.6562.5000
April 2011 CU KB 2512783 KB 2512782 12.0.6557.5000
February 2011 CU 2475886 2475885 12.0.6554.5000
December 10 CU 2458606 2458605 12.0.6550.5002-WSS, 12.0.6550.5000-MOSS
October 10 CU 2412268 2412267 12.0.0.6548
August 10 CU 2276474 2276472 12.0.0.6545
June 10 CU 983311 983310 12.0.0.6539
April 10 CU 981043 981042 12.0.0.6535
Feb 10 CU KB978396 KB978395 12.0.0.6529
December 09 CU KB977027 KB977026 12.0.0.6524
Oct 09 CU KB974989 KB974988 12.0.0.6520
Aug 09 CU KB973400 KB973399 12.0.0.6514
June 09 CU KB971538 KB971537 12.0.0.6510
April 09 CU KB968850 KB968851 12.0.0.6504
SP2 KB953338 KB953334 12.0.0.6421
February CU KB961755 KB961756 12.0.0.6341
December CU KB960010 KB960011 12.0.0.6335
October Cumulative update KB957691 KB957693 12.0.0.6332
August Cumulative update KB956056 KB951297 12.0.0.6327
Infrastructure Update KB951695 KB951297 12.0.0.6318
Post SP1 Hotfix   KB948945 12.0.0.6303
Post SP1 Hotfix   KB941274 12.0.0.6301
Post SP1 Hotfix   KB941422 12.0.0.6300
SP1     12.0.0.6219
October 2007 public update     12.0.0.6039
August 2007 hotfix     12.0.0.6036
RTM     12.0.0.4518
Beta 2 TR     12.0.0.4407
Beta 2     12.0.0.4017

 

在控制面板, 添加删除程序中, 还可以看到另外一种样子的版本号.

  WSS 3.0 MOSS 2007
April 10 CU 12.0.6535.5000 12.0.6535.5000
Dec 09 CU 12.0.6524.5000 12.0.6524.5000

SP2

12.0.6425.1000

12.0.6425.1000

post-SP1 hotfix- KB948945

12.0.6303.5000

12.0.6303.5000

SP1

12.0.6219.1000

12.0.6219.1000

RTM

12.0.4518.1016

12.0.4518.1016

Beta 2 TR

12.0.4407.1005

12.0.4407.1005

Beta 2

12.0.4017.1006

12.0.4017.1006

 

实用链接

http://technet.microsoft.com/en-us/office/sharepointserver/bb735839

posted @ 2009-12-23 18:40 中道学友 阅读(485) 评论(0) 编辑

2012年2月7日

[临时需要-待删]La Quinta to Universal studio of Hollywood

La Quinta Inn & Suites LAX

5249 West Century Blvd

Los Angeles, CA 90045

Walk to Century Eb & Aviation Ns

About 7 mins (0.3 mi)

Century Eb & Aviation Ns Stop ID: CNTAVIEN

3

Bus towards Green Line Station

9:49pm - 9:53pm (4 mins, 3 stops)

Green Line Station Stop ID: GRNL

Walk to Aviation Station (LAX Shuttle Connection)

About 1 min (10 mins to make transfer)

Aviation Station (LAX Shuttle Connection) Stop ID: 80000063

Metro Green Line (803)

Light rail towards Norwalk Station

10:03pm - 10:17pm (14 mins, 6 stops)

Imperial / Wilmington (Rosa Parks) Station Stop ID: 80000057

Walk to Imperial / Wilmington (Rosa Parks) Station

About 1 min (6 mins to make transfer)

Imperial / Wilmington (Rosa Parks) Station Stop ID: 80000012

Metro Blue Line (801)

Light rail towards 7th Street / Metro Center Station

10:23pm - 10:50pm (27 mins, 10 stops)

Alert.

7th Street / Metro Center Station Stop ID: 80000022

Walk to 7th Street / Metro Center Station

About 1 min (7 mins to make transfer)

7th Street / Metro Center Station Stop ID: 80000031

Metro Red Line (802)

Subway towards North Hollywood Station

10:57pm - 11:17pm (20 mins, 9 stops)

Universal City Station Stop ID: 80000042

Walk to California

About 22 mins (0.9 mi)

 

image

posted @ 2012-02-07 13:42 中道学友 阅读(15) 评论(0) 编辑

2012年1月26日

如何对SharePoint里OOB的JavaScript文件进行Debug 之二

上一篇文章如何对SharePoint里OOB的JavaScript文件进行Debug 之一?里我们解决了加载debug版的javascript的问题,这里我们将对Ribbon做进一步的研究。

 

SharePoint 2010的路径C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML下有个XML文件叫做CMDUI.XML.

该文件定义了Ribbon上的Command的ID,执行的Command。

 

你在界面上看到的字符串在这个xml文件中进行搜索, 找到你的command, 定下断点。

 

搞定。

 

举例

我们想看看这里的Link按钮背后的Javacript是如何进行的。

image

 

当你在搜索的过程中找到了下面的片段,就证明你离真相不远了。

image

为什么呢?因为你一定见过下面的界面吧。

image

 

最终找到了该函数在sp.ui.rte.publishing.debug.js文件中,设定断点, 效果如下。

image

 

Happy Debugging。

posted @ 2012-01-26 17:44 中道学友 阅读(16) 评论(0) 编辑

如何使用PowerShell修改注册表

下面的例子里, PowerShell修改了注册表键值, 完成了Security loop disable, 和loopbackcheck disable.

 

#Security loop disable so that you can look at it on the same machine

if(($gchn = Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0\" -Name "BackConnectionHostNames" -ea SilentlyContinue) -eq $null){

New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0\" -PropertyType MultiString -Value "$url" -Name "BackConnectionHostNames"

}else{

Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0\" -Name "BackConnectionHostNames" -Value ($gchn.BackConnectionHostNames+" $url")

}

 

#disable loobback check

if((Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" -Name "DisableLoopbackCheck" -ea SilentlyContinue) -eq $null){

New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" -PropertyType DWORD -Value "1" -Name "DisableLoopbackCheck"

}

 

 

参考资料

===============

SharePoint 2010 for Hosters Whitepaper

posted @ 2012-01-26 09:30 中道学友 阅读(15) 评论(0) 编辑

如何使用PowerShell修改Host文件

下面的命令, 为Host文件添加了一条记录, 让/sps2010/hostheader1/这个url指向server自己.

$url=”http://sps2010/hostheader1/”

if( (Get-Content $env:windir\System32\drivers\etc\hosts |?{$_ -imatch "\s$url"}) -eq $null){"`n127.0.0.1 $url" | Out-File -FilePath "$env:windir\System32\drivers\etc\hosts" -Append -encoding ascii}

 

参考资料

===============

SharePoint 2010 for Hosters Whitepaper

posted @ 2012-01-26 09:12 中道学友 阅读(17) 评论(0) 编辑

2012年1月25日

Service Object Model

下图展示了SharePoint 2010的Service Application框架里主要的类之间的关系。实箭头从parent类型指向child类型, 这里的child类型被保存在parent类型的一个集合型属性中。点箭头意思是SPServiceInstance类型代表着一个运行着的进程,该进程属于场范围内的由SPService类代表的服务。

image

 

SPFarm代表着一个服务器场。它是配置等级结构的顶级。

SPServer代表着一个物理机器。SPServer的ServiceInstances属性保存有该机器上运行着的所有的Windws Services和Web Services.

 

Service Objects, 也被认为是后端系统对象(back-end system objects),它们包括:

  • SPService:代表着一个在服务器场内安装的或可用的服务。每个SPService对象都有一个Instances属性。任何一台服务器上能运行任意一种服务的仅一个Instance,但某些service可以有多个instances,每个运行在一台单独的机器上。每个instance都由SPServiceInstance代表。
  • SPServiceInstance:代表着场内某个运行在某一台机器上的服务。该对象的Provision方法可以用来启动这个service instance。
  • SPServiceApplication:Service Instance寄存着Service Application。 没有Service Instance, Service Application也用不了。Service Application包含有应用程序自己的数据和配置,并且对管理员提供配置服务的接口。service application之间是完全独立的。
  • SPIisWebServiceApplication:该类型实现了ISharedServiceApplication接口,并且使得一个Service Application可以通过topology service给publish出去。

 

Client Objects。client application与back-end服务进行通讯。client是发起通讯的应用程序。 Service是等待client来与之通讯并相应该通讯请求的应用程序。 client service objects包括下面两种:

  • SPServiceProxy: 代表着服务器场内安装的一个service client。SPServiceProxy对象是SPServiceApplicationProxy对象的parent,就跟在服务器端,SPService对象是SPServiceApplication对象的parent一样。这里的parent对象也可以被认为是child对象的类工厂(class factory)。
  • SPServiceApplicationProxy:代表着一个向一个service application的连接(connection)。提供了一个对service application访问的接口。SPServiceApplicationProxy支持连接remote farm, 使得客户端代码使用remote farm的service application成为可能。SPServiceApplicationProxy是在创建Service application时自动创建出来的。 至少, service proxy会把请求forward到remote service application上。

 

上面的文章出自MSDN,看了是不是也感觉似懂非懂?

实践出真知,让我们用PowerShell来对这些概念进行一些挖掘,以加深理解。

 

SPServiceApplication

image

 

SPServiceInstance

image

 

SPService

image

 

SPService与SPServiceInstance

image

 

SPService与SPServiceApplication

image

 

SPServiceApplicationProxy

image

 

SPServiceProxy

image

 

SPServiceProxy与SPServiceApplicationProxy

image

反向寻找

image

 

SPFarm与SPServiceProxy

image

 

SPServiceApplication与SPServiceApplicationProxy

image

因为一个web application只能对应一个proxy group,一个proxy group里一种service application 的proxy只有一个。

通过proxy group就找到了对应的application proxy。

image

 

通过以上的命令, 我们已经将所有的这些对象都串联起来了。

是不是明白的更多一些了?

 

参考资料

=====================

Service Object Model

http://msdn.microsoft.com/en-us/library/ee537799.aspx

posted @ 2012-01-25 17:17 中道学友 阅读(10) 评论(0) 编辑

[好文翻译]保卫你的日历

译文

===============

守护你的日历

你的可用时间能成为你的生产力的致命杀手. 在大公司里, 我的客户经常使用共享日历的方式来让其他人能够看到什么时候他有"空闲时间"来约定开会. 在那里, 人们发现他们一整天的时间都被会议占满, 不到下午五点都没空处理自己的工作, 这种情况并不新鲜. 在小公司里, 或者是那些自己做老板的人, 有种共识是他们必须有空来处理和响应任何的事和所有的事. 结果呢, 他们针对某天, 某周, 或者某个月的安排都可以被其他人劫持, 劫持的目的却是满足劫持者自己的需求或者因为劫持者本身缺乏灵活性和良好的时间安排.


你的日历可以成为你的最佳生产力工具, 但是你必须保护它.


1. 为了你的目标, 项目或者任务在字面上预约时间 - 实实在在的分钟或小时

很多人在一份列表上工作, 而该列表却越变越长, 因为他们从来不预约需要用来事情的时间. 相反, 他们发现他们的工作日被其他人的安排给吃掉了. 当你设置你的工作计划时, 你需要实实在在地去占掉一些时间来处理你自己的工作.


2. 现实地面对你的时间.

有些人天真地认为他一天的工作量差不多等于18个小时的工作量. 但当我的客户们在实践中使用他们的日历时, 他们就能比较实际地估量他们一天能完成的工作量. 所有呢, 他们也就意识到了自己的能力, 意识到了他们能够承受的工作量. 从而呢, 他们也就可以做到实实在在的去代理任务给别人, 拒绝某些东西, 抛弃某些东西, 从而使得他们有能力接受新的任务.

 

3. 说不.

升了官的人经常认为他们能到那个位置是因为他们对别人说"Yes". 但是到了某个阶段, 说yes就不灵了. 为了保卫你的日历, 保卫你的生产力, 更为了保护你现在的价值, 你需要"NO"这个词. 如果某人在你的日历的空隙里约了个会议 , 而你却需要这段时间来做别的事情, 你就得拒绝这个会议. 如果通过给你打电话的方式跳出来, 简单地说"不, 今天我不能参加这个会议" 或者 "不, 我现在没时间" 是不会有什么问题的. 保护你的安排和时间, 如果你不这么做, 没有其他人会帮你做的.


4. 在你的团队中经营你的保护策略.

如果你有一个帮你安排时间的助理, 请确保他或她不会过分的占用你的时间. 跟你的团队聊聊如何去使用他们的日历来安排他们的工作时间, 而不仅仅是开会的时间. 你也许会需要设立一个团队的规矩来放低开会的优先级, 或者每两个会议之间至少留有一个小时. 只有你知道什么对你和你的团队是合理的. 我们要说这里重要的一点是: 合理的边界很重要. 如果人们(比你高或比你低)认为他们可以任何时间都获得你的注意力, 那么他们会毫不犹豫地这样去做. 如果他们理解你为了你的生产力而建立边界, 他们会理解, 尊重, 并配合你, 特别是当他们开始见到了点效果的时候.


高效管理者必须在他们的日历中预约时间的三件事, 保卫这三件事.

1. 你和你团队成员一对一的面谈的时间.
2. 创新地思考和为了重要决定指定策略的时间.
3. 锻炼身体, 午饭, 和通常的休息时间. 你需要这些时间来保护正确饮食的习惯和保护你的充沛精力.

 

注意: 快速的浏览一遍你这周的日历, 并问你自己这个问题: 这是在为谁的安排服务? 如果你的日历不为你服务, 你需要重新管理它, 如果你需要帮助, 给本文的作者打个电话吧.

 

原文

===============

Defend your Calendar

Availability can be death to productivity. In big companies, my clients often use shared calendars that give other people access to see where they have "free time" to schedule meetings. It's not uncommon for people to find themselves booked in meetings all day and unable to get to their own work until 5:00 PM. In smaller operations, or for self-employed people, there's often a sense that they have to be available to respond to anything and everything. As a result, their agenda for the day, week or month can get hijacked by other people's demands or by their own flexibility and lack of structure.

Your calendar can be one of your best productivity tools, but you have to defend it.


    1.    Literally block off time - real minutes or hours - for goals, projects and tasks. Lots of people work from lists that just get longer and longer because they never block off the time it takes to DO things. Instead, they find their days get eaten up with other people's agendas. When you set your work plan, literally block off the time in your calendar to do the work.


    2.    Be realistic about your time. What some people think is a day's work is more like 18 hours of work. When my clients get real about using their calendars, they also get real about what they can accomplish in a day. As a result they know their capacity. They know what they can take on. And they get real about having to delegate, defer or dump something in order to take on something new.


    3.    Say no. People who have moved up the ladder often feel like they got there by saying yes to people. But at a certain point, that doesn't scale. Defending your calendar, your productivity and ultimately your value now requires the word NO.  If someone books a meeting into a slot in your calendar when you need to do something else, decline the meeting. If someone pops by or calls you, it's OK to say "No, I can't fit in a meeting today," or "No, I don't have a minute right now." Defend your agenda and your time. If you don't, no one else will.


    4.    Engage your team in your defense strategy. If you have an assistant scheduling appointments for you, make sure he or she knows not to over book you. Talk to your team about using their calendars to schedule work time, not just meeting times - you might need to set team rules about not scheduling meetings first thing, or always leaving an hour between meetings. You know what's reasonable for you and your team, the point is, boundaries are important. If people (below and above you) think they can have your attention any time they want, they'll take it. If they understand that you are setting boundaries to improve performance, they'll respect that and get on board - especially when they start seeing the results.

3 things high performing managers must block time for in their calendars - and defend!
    1.    One on One's with your team
    2.    White space to think creatively and strategize for big decisions
    3.    Exercise, lunch and regular renewal breaks – you need to protect the habit of eating properly and managing your energy.
ACTION: Take a quick look at your calendar for the week and ask yourself this: "who's agenda is it serving?" If your calendar isn't serving you, you need to manage it. If you need help, give me a call.

Related articles on the blog:

Habits for high productivity days

posted @ 2012-01-25 10:40 中道学友 阅读(16) 评论(0) 编辑

2012年1月24日

使用PowerShell得到SharePoint的Application Pool

使用命令Get-SPServiceApplicationPool得到Services所使用的Application Pool

举例:

PS C:\Users\administrator.VSAT> $svcpools=get-spserviceapplicationpool
PS C:\Users\administrator.VSAT> $pool1=$svcpools|?{$_.name -eq "SharePoint Services App Pool"}
PS C:\Users\administrator.VSAT> $pool1

Name                                     ProcessAccountName
----                                     ------------------
SharePoint Services App Pool             VSAT\administrator

 

注意, 下面是使用foreach的方法来得到某个指定的application pool. Foreach命令明显没有pipeline的写法简单哦.

PS C:\Users\administrator.VSAT> foreach($svcpool in $svcpools) {if($svcpool.Name -eq "SharePoint Services App Pool") {$pool2=$svcpool} }
PS C:\Users\administrator.VSAT> $pool2

Name                                     ProcessAccountName
----                                     ------------------
SharePoint Services App Pool             VSAT\administrator

使用如下的命令来得到所有web application使用的application pool

PS C:\Users\administrator.VSAT> $pools = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.ApplicationPools
PS C:\Users\administrator.VSAT> $pool3=$pools | where {$_.Name -eq "SharePoint Hosting Pool"}

注意, SharePoint Services所使用的App Pool在IIS中并不显示名字, 显示的是它对应的GUID.

下面的命令可以帮助你将ID和名字对应起来.

PS C:\Users\administrator.VSAT> $svcpools=get-spserviceapplicationpool

PS C:\Users\administrator.VSAT> foreach($svcpool in $svcpools) {$svcpool.id.tostring() + " "+ $svcpool.name}
0ac86057-a06f-4156-b388-62540d6a4769     FASTSearchAdminServiceAppPool
c334555a-9e7b-469d-bdee-a4a40e831015  FASTSearchQueryAndSettingsAppPool
69693b39-2a7e-4931-b1bc-3e20bd2e3c3b  SecurityTokenServiceApplicationPool
9c03d8ea-0fa5-4850-9b76-b4e1018350ca    SharePoint Services App Pool
881b143d-cea5-4d2c-a319-ddb2ebf19de4  SharePoint Web Services System
PS C:\Users\administrator.VSAT>

 

image

 

参考资料

=================

Automating Microsoft SharePoint 2010 with Windows PowerShell 2.0 (book excerpt)

http://technet.microsoft.com/en-us/library/hh393957.aspx

Get-SPServiceApplicationPool

http://technet.microsoft.com/en-us/library/ff607544.aspx

posted @ 2012-01-24 15:29 中道学友 阅读(15) 评论(0) 编辑

MSDN文章纠错-Automating Microsoft SharePoint 2010 with Windows PowerShell 2.0 (book excerpt)

笔者经过实践, 发现文章Automating Microsoft SharePoint 2010 with Windows PowerShell 2.0 (book excerpt)中的Power Shell有错误.

 

第一个错误

=======================================

文章错误部分截图:

image

 

错误信息:

image

PS C:\Users\administrator.VSAT> New-SPManagedPath -RelativeURL "test" -WebApplic
ation "http://sps2010:8080/" -HostHeader -Explicit
New-SPManagedPath : Parameter set cannot be resolved using the specified named
parameters
.
At line:1 char:18
+ New-SPManagedPath <<<<  -RelativeURL "test" -WebApplication "http://sps2010:8
080/" -HostHeader -Explicit
    + CategoryInfo          : InvalidArgument: (:) [New-SPManagedPath], Parame
   terBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.SharePoint.Power
   Shell.SPCmdletNewManagedPath

 

解释:

New-SPManagedPath分为两种, 一种是带WebApplication参数的, 另一种是带HostHeader参数的.

image

这里的代码混淆了两种命令, 当然会运行出错.

 

解决方法

==================

命令中去掉PipeLine输入参数$webApp即可.

 

第二个错误

=======================================

文章中有代码如下:
$app = New-SPEnterpriseSearchServiceApplication `
-Name “Enterprise Search Hosting Service Application `
-DatabaseServer “spsql1” `
-DatabaseName “SharePoint_Hosting_Search” `
-ApplicationPool $pool `
-Partitioned

如果你运行它, 你会发现该命令报错.

原因是name参数后面缺了一个双引号".

 

这种文章都往MSDN上放, 太坑爹了.

 

建议MSDN站点提供评论功能, 这样有人发现了错误之后可以进行评论, 以帮助其他人不要再犯同样的错误, 耽误大家的宝贵时间.

 

参考资料

New-SPManagedPath
http://technet.microsoft.com/en-us/library/ff607693.aspx

posted @ 2012-01-24 14:32 中道学友 阅读(11) 评论(0) 编辑

如何在PowerShell中得到一个对象的所有属性名和方法名呢?

答案很简单Get-Member.

 

举例

==============

假设你查看一个SharePoint 2010里的名为Change Log的timer job的类型是什么, 都有哪些属性和方法可供调用. 你可以使用下面的语句来达到目的:

foreach($job in get-sptimerjob) {if($job.DisplayName -eq "Change Log") {get-member -inputobject $job}}

遍历所有的timer job, 找到之后dump出它所有的属性和方法.

image

 

参考资料

Using the Get-Member Cmdlet

http://technet.microsoft.com/en-us/library/ee176854.aspx

posted @ 2012-01-24 13:47 中道学友 阅读(11) 评论(0) 编辑

2012年1月20日

如何对SharePoint里OOB的JavaScript文件进行Debug 之一?

使用一片文章的做法,开启了对SharePoint Javascript的debugging,发现VS2010中打开的javascript都挤在一起,非常难以阅读和debug。

 

笔者记得14 hive\layouts文件夹下有debug版的javascript的。却不知道如何使用它们。

经过研究,发现MSDN上文章的对这个问题进行了描述,摘抄如下。

SharePoint Foundation also installs unminified, debug versions of the .js files in the same directory, for example, SP.debug.js, SP.Core.debug.js, SP.Ribbon.debug.js, and SP.Runtime.debug.js, and you can specify whether the debug versions are used. Default master pages in SharePoint Foundation insert a ScriptManager control in Web pages, and the ScriptMode property of this control is set to Auto by default.

You can override this default setting and use the debug .js files by adding <deployment retail="false" /> to the system.web section of the web.config file, which is located in the %inetpub%\wwwroot\wss\VirtualDirectories\80 directory.

注意MSDN描述retail值为true的影响如下:

When retail is set to true, ASP.NET disables certain configuration settings such as trace output, custom errors, and debug capabilities.

而且,默认值本来就是false。先不多想了,照着做先。

image

 

于是,笔者按照该文章的说法,直接修改web.config如下:

image

保存后,打开任意网页都报错。修改web.config, 关掉其CustomError选项, 得到具体错误信息如下:

image

错误信息:

It is an error to use a section registered as allowDefinition='MachineOnly' beyond machine.config.

再搜索,发现这篇文章对这个错误信息有如下的解释:

This message is displayed when a section definition specifies that it may only be provided in the Machine.Config file. The Identity section is not normally set this way, but it is possible for your ISP to change it in Machine.Config is they don't want users to be able to override the sections. Normally the admin should use a location tag with allow override=false to accomplish this, but the results are pretty much the same, the web.config may not contain the section in question. If you control the server you should check the configuration section definitions to see if the MachineOnly attribute is set on the section you are having problems. Removing the section that is causing the error will solve the problem, although you will not be able to change the attributes of that section.

这个选项看来是只在machine.config中提供的。目的是为了防止用户修改这个选项。

 

在路径C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG下寻找到machine.config, 发现有如下的条目:

<section name="deployment" type="System.Web.Configuration.DeploymentSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly"/>

笔者直接删掉了allowDefinition="MachineOnly",问题依旧。继续研究,发现在对IIS7.0的配置体系介绍的文章中,对MachineOnly选项介绍如下:

MachineOnly The section can be set only in ApplicationHost.config or Machine.config. Because this is the default setting, a section that doesn’t have an allowDefinition attribute uses this setting automatically.

笔者尝试修改该选项为MachineToApplication,AppHostOnly均告失败。笔者还添加了allowoverride="true",还是不行。

还原web.config, 单独修改machine.config,结果debugger中加载的还是普通的js,而不是debug版的js文件。

 

咨询了IIS的专家,得到答复说这个选项是不能在web.config中定义的。而且我的测试也证明了实在是无法解决这项冲突。

IIS专家说,你要load debug版的javascript,其实只要<compilation batch="false" debug="true">里的debug设为true即可。

IIS专家的说法经过了笔者测试。

有图有真相

image

 

花费了一个下午的时间,结果证明Client Object Model Distribution and Deployment 这篇文章完全在胡说八道。

而我的debug任务才只开了个头。

 

坑爹呀~~

 

参考资料

=====================

Client Object Model Distribution and Deployment

http://msdn.microsoft.com/en-us/library/ie/ee539757.aspx

Scripting Debugging in Internet Explorer

http://blogs.msdn.com/b/ie/archive/2004/10/26/247912.aspx

deployment Element (ASP.NET Settings Schema)

http://msdn.microsoft.com/en-us/library/ms228298.aspx

Introducing IIS 7.0 Configuration Architecture

http://technet.microsoft.com/en-us/library/cc268239.aspx

ScriptManager.ScriptMode Property

http://msdn.microsoft.com/EN-US/library/system.web.ui.scriptmanager.scriptmode

posted @ 2012-01-20 17:22 中道学友 阅读(16) 评论(0) 编辑

导航

<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

公告

若需了时直需了,若觅了时无了时。

世界上只有一种失败, 那就是半途而废.

个人介绍

博主专注SharePoint以及与之相关的微软产品与技术. 现就职于微软公司全球技术支持中心, 为分布于东南亚及澳洲企业级客户提供技术支持.


联系方式

邮箱:

ylongzhang@hotmail.com

新浪微博:

http://weibo.com/awpatp


访问分布

Locations of visitors to this page 免费计数器申请
blog计数器
昵称:中道学友
园龄:3年8个月
粉丝:31
关注:2

搜索

 

随笔分类(810)

随笔档案(811)

常用内容

工具箱

阅读排行榜

推荐排行榜

技术追求准确,态度积极向上