문제

우리는 SPFeatureReceiver 인터페이스를 구현하는 여러 기능을 개발했습니다.개발 환경에서 이것을 시도했을 때 처음에는 실패했습니다. MSDN의 이 스크립트:

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

스크립트를 실행하고 IIS를 재설정한 후 모든 것이 개발에 잘 작동했으며 다음에서 기능을 활성화할 수 있었습니다(팜 관리자로서). Site Settings > Manage Site Features 범위가 사이트로 설정된 경우 http://mysolution/_layouts/ManageFeatures.aspx?Scope=사이트.활성화 후 RemoteAdministratorAccessDenied 속성을 다시 true로 바꾸고 새로운 작업을 수행했습니다. IISRESET.

프로덕션 서버에서는 기능을 배포한 후 동일한 절차를 사용했습니다.

  1. RemoteAdministratorAccessDenied를 false로 설정
  2. IISRESET을 실행하고 기능 활성화를 시도했지만 실패했습니다.

우리가 받은 오류 메시지는 다음과 같습니다.

    Server Error in '/' Application.
--------------------------------------------------------------------------------

Security Exception 
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Access Denied.

Source Error: 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.  

Stack Trace: 


[SecurityException: Access Denied.]
   Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate() +27451643
   Microsoft.SharePoint.Administration.SPJobDefinition.Update() +152
   Company.IssueTracker.Features.NewIssueTimerJob.NewIssueTimerJobEventReceiver.FeatureActivated(SPFeatureReceiverProperties properties) +837
   Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) +25671814
   Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce) +25676799
   Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly) +27776095
   Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) +150
   Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope) +83
   Microsoft.SharePoint.WebControls.FeatureActivator.ActivateFeature(Guid featid, SPFeatureDefinitionScope featdefScope) +699
   Microsoft.SharePoint.WebControls.FeatureActivatorItem.BtnActivateFeature_Click(Object objSender, EventArgs evtargs) +140
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11058199
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11057738
   System.Web.UI.Page.ProcessRequest() +91
   System.Web.UI.Page.ProcessRequest(HttpContext context) +240
   ASP._layouts_managefeatures_aspx.ProcessRequest(HttpContext context) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971 

내 환경:셰어포인트 서버 2010

SharePoint 2007의 실제 질문:

도움이 되었습니까?

해결책

해당 블로그의 경우 C.연결된 기능이 도움이 되지 않습니다. WebApplication 범위를 지정하려고 하면 새 타이머 작업을 추가할 때 아마도 올바른 일이 될 것입니다.

FeatureDeactiving에서 작업을 다시 제거한다고 가정합니다.이 경우 누군가가 두 개의 웹에서 기능을 활성화한 다음 그 중 하나에서 제거하면 문제가 발생합니다.

다른 팁

나는 당신의 문제가 이미 여기서 해결되었다고 생각합니까? WebApplication 속성 설정을 시도할 때 액세스를 제공하는 FeatureActivated 이벤트 수신기가 거부되었습니다.문제는 여기에 더 자세히 설명되어 있습니다. http://blog.bugrapostaci.com/tag/remoteadministratoraccessdenied/

도움이되기를 바랍니다. c : marius

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top