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.
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.
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.
参考资料
=====================
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