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

  • 相关阅读:
    iOS学习05C语言函数
    iOS学习04C语言数组
    iOS学习03C语言循环结构
    iOS学习02C语言分支结构
    iOS学习01C语言数据类型
    Objective-C学习——中文URL编码和解码
    Objective-c 字面量
    SDWebImage
    mac的svn之cornerstone简易教程
    javascript 和oc交互
  • 原文地址:https://www.cnblogs.com/ahghy/p/2784505.html
Copyright © 2011-2022 走看看