1

I am trying to use the codeplex.spsl Sandbox Logging framework but am having trouble getting it to execute in my code.

The following error occurs on the last line of the following code snippet.

Getting Error Message for Exception System.InvalidOperationException: Error activating type from sandboxed code assembly. The cached sandboxed assembly could not be found.

using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;
using System.Collections.Generic;
using System.Linq;

using codeplex.spsl;

namespace SPOnline_EngineeringSiteAutomations.ProjectDocLib_EvntRcvr
{
    /// <summary>
    /// List Item Events
    /// </summary>
    public class ProjectDocLib_EvntRcvr : SPItemEventReceiver
    {
        static readonly string CONTRACTOR_FOLDER_NAME = "Contractor Folder";
        static readonly string CONTRACTOR_SEC_GROUP_NAME = "Contractors";

        /// <summary>
        /// An item was added.
        /// </summary>
        public override void ItemAdded(SPItemEventProperties properties)
        {
            // Logging Tool won't work!
            // This line prevents the event from firing!
            // If I comment it out then the event fires.
            Logging logger = new Logging(this.GetType());

This solution is suppose to be perfect for SharePoint online but since I cannot load dlls into the cloud GAC how is this tool suppose to work. Thanks for reading and I look forward to your ideas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.