zoukankan      html  css  js  c++  java
  • SharePoint 2010 开发遇到Access denied user is not a Farm Administrator

    执行如下 Poweshell 的脚本

    $contentService =[Microsoft.SharePoint.Administration.SPWebService]::ContentService
    $contentService
    .RemoteAdministratorAccessDenied=
    $false
    $contentService
    .Update()
     
     
     
    具体解释请参考下面的KB 文章
     
     

    RemoteAdministratorAccessDenied is a persisted property which can be set to false to disable the feature. You can do this either in a Console app or use Powershell and then perform an IISReset.

    //Console app code

    SPWebService myService = SPWebService.ContentService; 
    myService.RemoteAdministratorAccessDenied = false; 
    myService.Update(); 


    //PowerShell code

    function Set-RemoteAdministratorAccessDenied-False()
    {
        [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
        [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") > $null

        # get content web service
        $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
        # turn off remote administration security
        $contentService.RemoteAdministratorAccessDenied = $false
       $contentService.Update()         
    }

    Set-RemoteAdministratorAccessDenied-False

  • 相关阅读:
    书单
    parzen 窗的matlab实现
    Oracle-07
    图片加载不出来
    省市区三表建立及数据插入
    a链接与button按钮混用
    省市区三级联动,获取地区编号,JSON格式
    纯JS省市区三级联动
    JDK与JRE的区别
    web-03-jQuery
  • 原文地址:https://www.cnblogs.com/ahghy/p/2784505.html
Copyright © 2011-2022 走看看