MySiteをステープルするときに最小限のダウンロード戦略をオフにします

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/93676

  •  10-12-2019
  •  | 
  •  

質問

私のサイトをプロビジョニングするときにMDSを無効にする必要があります。 私はカスタム機能のイベント受信者で試しましたが、受信者のこのコードを実行すると

Guid featureGuid = new Guid("87294C72-F260-42f3-A41B-981A2FFCE37A");
if (mySiteWeb.Features[featureGuid] != null)
{
     mySiteWeb.Features.Remove(featureGuid);
}
.

何も現れていません。

マイサイトが作成され、ユーザーインターフェイス全体に1回のみ機能します。Manage Site Featuresにアクセスして、カスタム機能を無効にして手動でアクティブ化すると、MDSがオフになります。

これを達成する方法は何ですか?

役に立ちましたか?

解決

We had the same problem. We had a stapling feature that was applying branding to my personal sites. Staplers code ran, but MDS was still active. What we did, was to add a custom control to a personal site master page which deactivated MDS when site was loaded. In this custom control we added if/else check if this code ran once ( by putting value to web.properties) and if it did already, just did not deactivate it again.

We were able to do this, as this was a farm solution. If you are on Office 365 etc, you need to do "Application Stapling"

http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2013/03/04/sharepoint-2013-app-deployment-through-quot-app-stapling-quot.aspx

他のヒント

PowerShell below will update the current farm “MDSFeature” XML to disable for all newly created site collections and child webs. If you need to support IE8 and older browsers this can be helpful. The feature GUID technically remains active but won’t do anything with missing DLL assembly detail. After desktops upgrade (IE11/Win8) then this change can be reversed with a simple file copy “ORIG” back to “XML.” Hope this helps!

http://www.spjeff.com/2015/02/13/knee-cap-mds-disable-for-new-and-current-sites/

# Disable MDS - run once per farm
# unregister Feature definition from ConfigDB
Uninstall-SPFeature MDSFeature -Force -Confirm:$false

# backup current Feature XML
$path = "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\MDSFeature\feature.xml"
Copy-Item $path "$path-orig"

# modify Feature XML to suppress DLL assembly detail  (still registered, but unable to run)
[xml] $x = Get-Content $path
$x.Feature.RemoveAttribute("ReceiverClass")
$x.Feature.RemoveAttribute("ReceiverAssembly")
$x.Save($path)

# register Feature to ConfigDB
Install-SPFeature MDSFeature

I'm not finished testing this, but if you're changing the master page, you can add the following to disable MDS(it will render the page in standard mode nomatter if MDS is activated or not):

<SharePoint:PageRenderMode runat="server" RenderModeType="Standard" />
ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top