Thread being aborted sharepoint 2013

Hi All,
I am receiving the below error "Thread being aborted" when i try to open my dev url. I have no idea about the area(ThirdSPS2010) which is throwing error. As the production was set up by third party and i just took back up of the url and also the
back up of custom webparts and restored in development environment. I am struck with this error now :(
06/25/2013 14:06:17.45     w3wp.exe (0x22A4)                           0x13DC    ThirdSPS2010               
     Error                             00000    Unexpected    Thread was
being aborted.    b6c1289c-d07c-a0de-44ea-088cb42c35e3
Above this i can find multiple Distributed cache warnings as below
SharePoint Foundation             DistributedCache                  ah24w    Unexpected  
 Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts are
present or running in the farm.     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'.
Can someone guide what is the reason for these errors :(
Thanks in advance
Ranjani.R

Unlike other service instances, though, the Distributed Cache Service Instance should either be installed *and* online on a SharePoint server, or not installed at all. If the service instance is stopped (disabled) but not uninstalled, details about the associated
Cache Host stay in the Cache Cluster Config store, which can cause problems.
For this reason, the Distributed Cache Service Instance should never be stopped via the Services on Server page in Central Administration or via Stop-SPServiceInstance in PowerShell. A special cmdlet, Remove-SPDistributedCacheServiceInstance, is available
to stop *and* uninstall the local Distributed Cache Service Instance from a SharePoint server. This cmdlet, and its complement Add-SPDistributedCacheServiceInstance, should be used instead of Stop- and Start-SPServiceInstance for managing the local Distributed
Cache Service Instance.
from
http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx

Similar Messages

  • Thread was being aborted Exception while creating large number of Sites in SharePoint 2013

    Hi All,
    I am getting threading exception while creating a large extent of sites in SharePoint 2013. I am reading data from an excel file and then looping each row. The sites are creating for first two rows then i am getting exception. This code working fine in dev
    server but not in UAT server. I tried with changing maxRequestLength in web.config but not working. And also followed the below link.
    http://support.microsoft.com/kb/928756
    My code as follows-
    private void CreateSites(DataRow dr)
                try
                    using (SPSite site = new SPSite(OtherSiteCollection)) // I am creating sites in another site collection
                        using (SPWeb web = site.OpenWeb())
                                SPWeb newWeb = null;
                                SPWebTemplateCollection templates = site.RootWeb.GetAvailableWebTemplates(1033);
                                SPWebTemplate template = (from SPWebTemplate m in
                                                              templates
                                                          where m.Title == "SiteTemplate"
                                                          select m).FirstOrDefault(); //Here i am using custom template
        string siteName = dr["Site Name"].ToString();
                                newWeb = web.Webs.Add(siteTitle, siteTitle, siteDescription, 1033, template, true, false); //Getting exception here.
                                newWeb.Update();
                                newWeb.Dispose();
                catch (Exception ex)
                    lblMsg.Text = "Exception in create sites : " + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString()
    I am getting error as-
    Exception in create sites: Thread was being aborted.;   at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent,
    String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, SPWebTemplate WebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
       System.Threading.ThreadAbortException: Thread was being aborted.
       at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32&
    plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, SPWebTemplate WebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
    Thread was being aborted.;   at System.Threading.ThreadAbortException: Thread was being aborted.
    Can anyone please help. Thanks!
    dinesh

    If you do this from a Console application, does it succeed?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • SPLongOperation throws error "Thread was being aborted"

    Recently we have migrated our SharePoint application from 2010 to 2013, we have upgraded our solution from VS 2012 to VS 2013 and deployed it successfully in newly installed SharePoint 2013 prior to content DB migrate and all.
    In our solution, we had requirement to implement lengthy operation which create site from site template, copying documents from one library to another, creating user groups and so on. To achieve these, we have used
    SPLongOperation which is taking care for not to abort thread and complete operation without and time constraint, which is working fine 2010 environment. 
    After upgrading to 2013, we started facing problem with "Thread was being aborted", which seems SPLongOperation is not working.
    Have I missed any configuration?
    Help appreciated.
    Arpan Shah MSFT Mark as Answer if it solves your problem. Vote As Helpful if the post is helpful for you.

    Hi,
     According to your description, I suggest you debug your code in the test
    environment and check if the method of SPLongOperation.End throw the exception.
    The code snippet below for your reference:
    //Long Operation Code
    using (SPLongOperation longOperation = new SPLongOperation(this.Page))
    //Start the long operation
    longOperation.Begin();
    //Your Long Operation Code Goes Here...
    //End the long operation
    longOperation.End("http://localhost/_layouts/success.aspx", Microsoft.SharePoint.Utilities.SPRedirectFlags.DoNotEndResponse, HttpContext.Current, "");
    More information:
    http://snahta.blogspot.com/2009/10/splongoperation-class.html
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Workflow is Canceled instantly - System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    I am trying to solve some issues and strange behaviour with an important workflow hooked up with an InfoPath 2010 list in SharePoint 2010. Everything worked fine until now.
    One workflow item has ended prematurely with the workflow history messages "An error has occurred in workflowname" followed by some init text message I added, and finally "Could not start workflowname"
    (not sure of the exact translation but something like that). Status is still "On Going" (again not sure of translation).
    The workflows after this has gotten the status "Canceled" with no further error messages. However the first init text I added is visible in their workflow history but no other messages are displayed, neither my custom ones nor
    the built in.
    Please help me out, any hints or pointers to help debug this is very appreciated! I do not have other than "view" access so I will have to tell the IT-department to check logs and perform changes if needed.
    /Jesper Wilfing
    Edit: The IT guys sent me the error message from the log file:
    Workflow Infrastructure       72fq
     Unexpected Start Workflow: System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    Thank you for sharing and it will help others who meet the same issue.
    Best regards,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • SPUtility.GetPrincipalsInGroup method throws Thread was being aborted error when SPGroup Name is passed

    Hello,
    I am getting 'Thread was being aborted - Unable to evaluate expression because
    the code is optimized or a native frame is on top of the call stack' error
    when I use 'SPUtility.GetPrincipalsInGroup' method.
    bool bReachedMaxCount = false;
    SPPrincipalInfo[] _spPrincInfoColl = SPUtility.GetPrincipalsInGroup(web, groupName, Int32.MaxValue - 1, out bReachedMaxCount);
    We have both SharePoint groups (SPGroup) & Active Directory groups in our site.
    I am checking if logged in user has access to the group name that I am passing here as 'groupName'.
    Code works without any error when I pass 'domain name' as 'groupName' e.g. (Domain\\usergroup) but the same throws error when I pass SharePoint groups (SPGroup) name.
    Both type of these groups have at least 'Read' permission on site.
    I have this code inside 'try-catch' block and hence I am able to catch that thread aborted error.
    What could be the reason for this error? I don't get any call stack and all other properties of exception object are either null or with garbage values.
    I am having SP2010 foundation, VS2012 and .Net4.5 installed on my machine.
    Kindly suggest on this. Thank you.
    Sagar S.

    I think the RunWithElevatedPrivilages is not working correctly. I believe that the new site and web objects need to be opened within elevatedprivilages to work. it looks like the way your code is working the SPsite and SPweb objects are getting opened before
    the RunWithElevatedPrivilages give this a try and see if your result changes.
    bool IsUserInGroup = false;
    try
    SPSecurity.RunWithElevatedPrivileges(() =>
    Guid siteId = SPContext.Current.Site.ID;
    Guid webId = SPContext.Current.Web.ID;
    using (SPSite newSite = new SPSite(siteId)) {
    using (SPWeb newWeb = newSite.OpenWeb(webId)){
    bool bReachedMaxCount = false;
    SPPrincipalInfo[] _spPrincInfoColl = SPUtility.GetPrincipalsInGroup(newWeb, "TestGroup", Int32.MaxValue - 1, out bReachedMaxCount);
    if (_spPrincInfoColl.Where(a => a.LoginName == username).Count() > 0)
    IsUserInGroup = true;
    }//close web
    }//close site
    catch (Exception ex)
    LogManager.LogMessage(ex.Message.ToString());
    Alex

  • Thread was being aborted

    I am getting error like in my asp.net website
    System.Threading.ThreadAbortException: Thread was being aborted.
    at System.String.wstrcpy(Char* dmem, Char* smem, Int32 charCount)
    at System.String.FillStringChecked(String dest, Int32 destPos, String src)
    at System.String.Concat(String str0, String str1)
    at reporterror.Page_Load(Object sender, EventArgs e)
    In that procedure i do perform concatenation of two large strings. 
    Can anyone help to know why this error comes? Why Thread was being aborted error comes?

    Hello,
    For ASP.NET projects please consider asking your question here
    http://forums.asp.net/
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Email attachments from SSRS email subscription are not being uploaded to an email enabled SharePoint 2013 document library

    Email attachments from SSRS email subscription are not being uploaded to an email enabled SharePoint 2013 document library.
    I have tested the library using a standard email (with attachment) to the library and this works fine. 
    I have monitored the drop folder on the server and I can see both emails being picked up in drop and processed by SharePoint.  The email sent from a regular email account is uploaded with the attachment, whereas the email sent via SSRS subscription
    email is uploaded and the attachment (report) is missing.

    An update on this.  The email when sending from SSRS subscription is received in the library and the attachment is contained within the .EML file uploaded.
    The behaviour that I would like from SSRS subscription emails are to just have the document and not the email.
    Below is a snippet of the .EML files I quick copied from the Drop folder.
    Email attachment snippet sent from SSRS Subscrption:
    ----boundary_2477_75fa3d73-56de-4948-ad82-6588f3a35b95
    Content-Type: application/octet-stream; name="Toilet Usage by Month.docx"
    Content-Transfer-Encoding: base64
    Content-Dis;
     filename="=?utf-8?B?VG9pbGV0IFVzYWdlIGJ5IE1vbnRoLmRvY3g=?="
    Content-ID: <10722c0f-749e-4ecb-ac3f-206317bae734>
    UEsDBBQAAAAIAEVcbEY4Xh4a5nsAAPJtMQARABwAd29yZC9kb2N1bWVudC54bWwgohgA
    KKAUAAAAAAAAAAAAAAAAAAAAAAAAAAAA7N1rr1/XcSforyL4VRooR3vd9to76Kihjto9
    I8T2TDvAzFuaPrE1kUiCouxWPv38DyX50nHSniCdyS96bIAUL+d/LnxO7Vq11qr6j//p
    v3/x+Qe/fnr75WevX/3lD9qfHz/44OnVy9e/+OzVL//yB1+9+9sfXj/44Mt3L1794sXn
    r189/eUPvn768gcf/KeP/uNv/uIXr19+9cXTq3cfPF7h1Zd/8evHH/7q3bs3f/Hhh1++
    /NXTFy++/PPXb55ePf7wb1+//eLFu8cv3/7ywy9evP27r9788OXrL968ePfZzz/7/LN3
    X3/Yj+P8wbcv8/rxXt+++otvX+KHX3z28u3rL1//7bvnN/mL13/7t5+9fPr2p+/e4os/
    5f1+8yaffPshv3+Pj4/l3a++e5Ff/1Pv9tdffP7d3/vNmz/lvf3i7YvfPL6AX3z+zTv6
    Email attachment snippet sent from Outlook:
    --_004_A4C6DCEDE4346446A79AFF493D278530FB87FA07MELABCDEXA1airp_
    Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;
     name="Toilet Usage by Month.docx"
    Content-Description: Toilet Usage by Month.docx
    Content-Dis; filename="Toilet Usage by Month.docx";
     size=76574; creation-date="Thu, 12 Mar 2015 00:41:14 GMT";
     modification-date="Thu, 12 Mar 2015 00:41:14 GMT"
    Content-Transfer-Encoding: base64
    UEsDBBQAAAAIAMJcbEY4Xh4a5nsAAPJtMQARABwAd29yZC9kb2N1bWVudC54bWwgohgAKKAUAAAA
    AAAAAAAAAAAAAAAAAAAAAAAA7N1rr1/XcSforyL4VRooR3vd9to76Kihjto9I8T2TDvAzFuaPrE1
    kUiCouxWPv38DyX50nHSniCdyS96bIAUL+d/LnxO7Vq11qr6j//pv3/x+Qe/fnr75WevX/3lD9qf
    Hz/44OnVy9e/+OzVL//yB1+9+9sfXj/44Mt3L1794sXnr189/eUPvn768gcf/KeP/uNv/uIXr19+
    9cXTq3cfPF7h1Zd/8evHH/7q3bs3f/Hhh1++/NXTFy++/PPXb55ePf7wb1+//eLFu8cv3/7ywy9e
    vP27r9788OXrL968ePfZzz/7/LN3X3/Yj+P8wbcv8/rxXt+++otvX+KHX3z28u3rL1//7bvnN/mL

  • CRVS2010 Beta thread was being aborted

    Hi,
    I am attempting to upgrade from CR 11.5 to CR 2010 Beta2  (with VS 2010, net 4) to see how the reports and applications do in the new environment. All of the reports have sql parameters and connect to sql server 2008r2 stored procedures. I am experiencing one strange issue.
    In the crystal viewer toolbar, if I print the report, after the printer dialog box is opened, the page and report won't work. (it doens't matter if you close the dialog or actually print the report) So, if there are parameter fields or a generate report button, nothing works after the print dialog has been shown. The CrystalDecisions.Web.ErrorEventArgs error says "Thread was being aborted". In order to have access to the web page, the user now needs to refresh the page. Why is this happening? Everything worked fine in both CR 11.5 and CR 2008 Also, if the export button is clicked instead of the print button, everything works fine afterwards, so it's just the print button that is errorring out.
    This error happens both on a development computer (XP sp3) and a development server (2008 x86).
    Any ideas? Thanks, Harlan

    Hi Don,
    I created a new asp.net Crystal reports Web site, created a new report and just connected it to a table instead of a stored procedure with no parameters. When I run it from the browser, I still get the same error messages when I try to print so it does not appear to be a migration issue.
    Thanks again,
    Harlan

  • SPListItem.Update() = Thread was being aborted.

    Hello,
    I currently have a problem to update a mysite list item.
    This code is working very well on my dev environment but in the production it's not working :/
    My logs end with : 
    Item added
    Error: Thread was being aborted.
    Nok: Thread was being aborted
    Anyone have an idea? (on prod the mysites are in a separate web application. that's the only difference)
    Thanks
    public static object Add(String User, String Title, String Text)
    try
    String AuthorLoginName = SPContext.Current.Web.CurrentUser.LoginName;
    SuiteBarLog("Sender: " + AuthorLoginName);
    SPSecurity.RunWithElevatedPrivileges(delegate()
    SuiteBarLog("RunWithElevatedPrivileges");
    using (SPWeb Web = new SPSite(new PeopleManager().GetPropertiesFor(User).PersonalUrl).RootWeb)
    SuiteBarLog("Open Web: " + Web.Url);
    Web.AllowUnsafeUpdates = true;
    SPUser Author = Web.EnsureUser(AuthorLoginName);
    try
    SPList List = Web.Lists[LISTNAME];
    SPListItem Item = List.AddItem();
    SuiteBarLog("Item added");
    Item["Title"] = Title;
    Item["Text"] = Text;
    Item["Read"] = false;
    Item["Author"] = Author.ID + ";#" + Author.Name;
    Item.SystemUpdate();
    SuiteBarLog("Notification Updated");
    List.Update();
    SuiteBarLog("List Updated");
    catch (Exception ex)
    SuiteBarLog("Error: " + ex.Message);
    Web.AllowUnsafeUpdates = false;
    return "ok";
    catch(Exception ex)
    SuiteBarLog("Nok : " + ex.Message);
    return "Nok : " + ex.Message;

    Thanks, but it solves nothing. I have no error to open the website. The error appears once I update my item in the list.
    I tried your code but as I thinked it's always the same error.
    public static object Add(String User, String Title, String Text)
    try
    SuiteBarLog("Add Notification to " + User);
    String AuthorLoginName = SPContext.Current.Web.CurrentUser.LoginName;
    SuiteBarLog("Sender: " + AuthorLoginName);
    String PersonalURL = new PeopleManager().GetPropertiesFor(User).PersonalUrl;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    SuiteBarLog("RunWithElevatedPrivileges");
    using (SPSite Site = new SPSite(PersonalURL))
    using (SPWeb Web = Site.OpenWeb())
    SuiteBarLog("Open Web: " + Web.Url);
    Web.AllowUnsafeUpdates = true;
    SPUser Author = Web.EnsureUser(AuthorLoginName);
    SuiteBarLog("Author confirmed: " + Author.Email);
    try
    SPList List = Web.Lists[LISTNAME];
    SPListItem Item = List.AddItem();
    SuiteBarLog("Item added");
    Item["Title"] = Title;
    Item["Text"] = Text;
    Item["Read"] = false;
    Item["Author"] = Author.ID + ";#" + Author.Name;
    Item.SystemUpdate();
    SuiteBarLog("Notification Updated");
    List.Update();
    SuiteBarLog("List Updated");
    catch (Exception ex)
    SuiteBarLog("Error: " + ex.Message);
    Web.AllowUnsafeUpdates = false;
    return "ok";
    catch(Exception ex)
    SuiteBarLog("Nok : " + ex.Message);
    return "Nok : " + ex.Message;

  • Thread was being aborted Error.

    HI,
        I am Getting Below error:
    Thread was being aborted. Source of Error :mscorlib Error Method :18 Helplink : Line of Error : at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() 
    Thanks is in Advance,
    Help me.

    try to move Response outside of the Try/Catch block
    Check this thread
    http://stackoverflow.com/questions/1433448/thread-was-being-aborted

  • How can I disable managed properties from being automatically generated in SharePoint 2013

    In SharePoint 2010 we had the option to turn this off for a crawled property category.
    How can we turn this function off in SharePoint 2013?

    Thanks Steve! That sure was not obvious... check, save, uncheck save... how did you figure that one out?
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • SharePoint 2013 event receiver error

    I am currently working on a SharePoint online project. I am facing a strange issue. My code generates 6 documents
    in 6 different document libraries along with other metadata. When I save data to a List, the event receiver fires and creates all the 6 documents. But sometimes it stops creating the 6 documents and left with 1 or 2 documents. Sometimes documents has been
    created but without any metadata. The same code is working fine in my on-premises environment, but it sometimes breaks in the Office 365 environment. I also created a log list to track the issue as we cannot debug in Office 365. In the log list I found a error
    message saying "Thread was being aborted." Below is my code. please help it is happening only in Office 365 environment.
    using Microsoft.SharePoint;
    /// <summary>
    /// List Item Events
    /// </summary>
    public class ExcelGenReceiver : SPItemEventReceiver
    /// <summary>
    /// The template URL
    /// </summary>
    private const string TemplateUrl = "/Quotation Analysis Electrical/Forms/Quotation Analysis Sheet ELEC_Blank.xlsm";
    /// <summary>
    /// The template url1
    /// </summary>
    private const string TemplateUrl1 = "/Quotation Analysis Mechanical/Forms/Quotation Analysis Sheet MECH_Blank.xlsm";
    /// <summary>
    /// The template url2
    /// </summary>
    private const string TemplateUrl2 = "/TenderSummaryLib/Forms/TenderSummaryBlankMaster1.xlsm";
    /// <summary>
    /// The RFI template URL
    /// </summary>
    private const string RfiTemplateUrl = "/EstimatingRFI/Forms/RFI Schedule MASTER.docx";
    /// <summary>
    /// The drawing template URL
    /// </summary>
    private const string DrawingTemplateUrl = "/Tender and Drawing Schedule/Forms/Tender Document Drawing Schedule.docx";
    /// <summary>
    /// The tender return template URL
    /// </summary>
    private const string TenderReturnTemplateUrl = "/Est_Tender_Pricing_Document/Forms/Tender Pricing Document blank.xlsm";
    /// <summary>
    /// The project number
    /// </summary>
    private string projectNumber = string.Empty;
    /// <summary>
    /// The project name
    /// </summary>
    private string projectName = string.Empty;
    /// <summary>
    /// The no bid
    /// </summary>
    private string noBid;
    /// <summary>
    /// The team
    /// </summary>
    private string team;
    /// <summary>
    /// The description
    /// </summary>
    private string description;
    /// <summary>
    /// The status
    /// </summary>
    private string status;
    /// <summary>
    /// The electrical
    /// </summary>
    private SPUser electrical;
    /// <summary>
    /// The mechanical
    /// </summary>
    private SPUser mechanical;
    /// <summary>
    /// The document date
    /// </summary>
    private DateTime? docDate;
    /// <summary>
    /// The tender received
    /// </summary>
    private DateTime? tenderReceived;
    /// <summary>
    /// The tender return
    /// </summary>
    private DateTime? tenderReturn;
    /// <summary>
    /// The pre construction program start date
    /// </summary>
    private DateTime? preConstructionProgramStart;
    /// <summary>
    /// The pre construction program end date
    /// </summary>
    private DateTime? preConstructionProgramEnd;
    /// <summary>
    /// The sector
    /// </summary>
    private string sector;
    /// <summary>
    /// The design build
    /// </summary>
    private string designBuild;
    /// <summary>
    /// The build type
    /// </summary>
    private string buildType;
    /// <summary>
    /// The service program start date
    /// </summary>
    private DateTime? serviceProgramStart;
    /// <summary>
    /// The service program completion date
    /// </summary>
    private DateTime? serviceProgramCompletion;
    /// <summary>
    /// The client1
    /// </summary>
    private string client1;
    /// <summary>
    /// The client2
    /// </summary>
    private string client2;
    /// <summary>
    /// The client3
    /// </summary>
    private string client3;
    /// <summary>
    /// The client4
    /// </summary>
    private string client4;
    /// <summary>
    /// The consultant
    /// </summary>
    private string consultant;
    /// <summary>
    /// An item is being added.
    /// </summary>
    /// <param name="properties">The Item Event properties</param>
    public override void ItemAdded(SPItemEventProperties properties)
    //this.EventFiringEnabled = false;
    var web = properties.Web;
    var listItem = properties.ListItem;
    try
    LogIssue(web, null, "Item Added", "List Item Id {0}", listItem.ID);
    if (!this.AttemptCopyProcess(listItem))
    LogIssue(web, null, "List Id : " + listItem.ID, "AttemptCopyProcess failed.");
    catch (Exception ex)
    LogIssue(web, ex, "List Id : " + listItem.ID, "AttemptCopyProcess failed.");
    finally
    //this.EventFiringEnabled = true;
    LogIssue(web, null, "List Id : " + listItem.ID, "Event Receiver completed sucessfully.");
    /// <summary>
    /// Logs any issues found
    /// </summary>
    /// <param name="webContext">The web context.</param>
    /// <param name="exception">The exception, if null not exception details are written</param>
    /// <param name="contextId">The context identifier, a unique identifier that allows us to know where the call originated, i.e. a List and ListItem Id, or a Page Url</param>
    /// <param name="comment">The comment.</param>
    /// <param name="args">The arguments.</param>
    private static void LogIssue(SPWeb webContext, Exception exception, string contextId, string comment, params object[] args)
    //// if (webContext.AllProperties.ContainsKey("EnableLogging"))
    var list = webContext.Lists.TryGetList("ErrorIssues");
    if (list != null)
    var item = list.AddItem();
    item["Title"] = contextId;
    if (exception != null)
    item["Message"] = exception.Message;
    item["InnerException"] = exception.InnerException ?? (object)string.Empty;
    item["StackTrace"] = exception.StackTrace;
    if (!string.IsNullOrEmpty(comment))
    item["Comment"] = string.Format(comment, args);
    item.Update();
    /// <summary>
    /// Assigns the field.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="fieldName">Name of the field.</param>
    /// <param name="contextId">The context identifier.</param>
    /// <returns>The fields string value if present, otherwise string.empty.</returns>
    private static string AssignField(SPListItem listItem, string fieldName, string contextId)
    var fieldValue = string.Empty;
    if (listItem.Fields.ContainsField(fieldName) && listItem[fieldName] != null)
    fieldValue = listItem[fieldName].ToString();
    else
    LogIssue(listItem.Web, null, contextId, string.Format("Field not available : {0}", fieldName));
    return fieldValue;
    /// <summary>
    /// Assigns the field as a DateTime
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="fieldName">Name of the field.</param>
    /// <param name="contextId">The context identifier.</param>
    /// <returns>Returns the date if found, otherwise returns DateTime.MinValue</returns>
    private static DateTime? AssignDateField(SPListItem listItem, string fieldName, string contextId)
    DateTime? fieldValue = null;
    if (listItem.Fields.ContainsField(fieldName) && listItem[fieldName] != null)
    fieldValue = Convert.ToDateTime(listItem[fieldName].ToString());
    else
    LogIssue(listItem.Web, null, contextId, string.Format("Field not available : {0}", fieldName));
    return fieldValue;
    /// <summary>
    /// Creates the folder.
    /// </summary>
    /// <param name="listdoc">The list.</param>
    /// <param name="folderName">Name of the folder.</param>
    private static void CreateFolder(SPList listdoc, string folderName)
    LogIssue(listdoc.ParentWeb, null, "List Id : " + listdoc.ID, "Creating folder {0} in {1}", folderName, listdoc.RootFolder.ServerRelativeUrl);
    // Updated by Indusnet
    SPListItem folder1 = listdoc.Items.Add(listdoc.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder);
    folder1["Name"] = folderName;
    folder1.Update();
    listdoc.Update();
    // End Updated
    /// <summary>
    /// Assigns the user field.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="fieldName">Name of the field.</param>
    /// <param name="contextId">The context identifier.</param>
    /// <returns>Returns the user if found, otherwise null.</returns>
    private static SPUser AssignUserField(SPListItem listItem, string fieldName, string contextId)
    SPUser user = null;
    if (listItem.Fields.ContainsField(fieldName) && listItem[fieldName] != null)
    var userField = (SPFieldUser)listItem.Fields.GetField(fieldName);
    var fieldValue = (SPFieldUserValue)userField.GetFieldValue(listItem["electrical_proj_manager"].ToString());
    user = fieldValue.User;
    else
    LogIssue(listItem.Web, null, contextId, string.Format("Field not available : {0}", fieldName));
    return user;
    /// <summary>
    /// Attempts the copy process.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <returns>True if it successfully processed, false otherwise.</returns>
    private bool AttemptCopyProcess(SPListItem listItem)
    if (listItem.ParentList.Title != "Enquiry_Template")
    LogIssue(listItem.Web, null, "List Id : " + listItem.ID, "ListItem titles is not Enquiry_Template, aborting.");
    return false;
    var finalNum = "15-" + new Random().Next(0, 9999).ToString("D4");
    this.Initialize(listItem, finalNum);
    if (this.noBid != "Yes")
    LogIssue(listItem.Web, null, "List Id : " + listItem.ID, "The noBid field does not equal Yes, aborting.");
    return false;
    this.CopyFiles(listItem.Web, finalNum);
    this.CreateFolders(listItem.Web);
    return true;
    /// <summary>
    /// Copies the files.
    /// </summary>
    /// <param name="web">The web.</param>
    /// <param name="finalNum">The final number.</param>
    private void CopyFiles(SPWeb web, string finalNum)
    LogIssue(web, null, "Web Id : " + web.ID, "Setting the copying of files ...");
    var mechanicalQuoteList = web.Lists["Quotation Analysis Mechanical"];
    var electricalQuoteList = web.Lists["Quotation Analysis Electrical"];
    var tenderSummarList = web.Lists["TenderSummaryLib"];
    var estimatingList = web.Lists["EstimatingRFI"];
    var tenderSheduleList = web.Lists["Tender and Drawing Schedule"];
    var tenderPricingList = web.Lists["Est_Tender_Pricing_Document"];
    var url1 = mechanicalQuoteList.RootFolder.ServerRelativeUrl;
    var url = electricalQuoteList.RootFolder.ServerRelativeUrl;
    var url2 = tenderSummarList.RootFolder.ServerRelativeUrl;
    var urlA = estimatingList.RootFolder.ServerRelativeUrl;
    var urlB = tenderSheduleList.RootFolder.ServerRelativeUrl;
    var urlC = tenderPricingList.RootFolder.ServerRelativeUrl;
    var foldername1 = string.Empty;
    var foldername = string.Empty;
    var foldername2 = string.Empty;
    var foldernameA = string.Empty;
    var foldernameB = string.Empty;
    var foldernameC = string.Empty;
    var folder1 = web.Folders[url1 + "/" + foldername1];
    var folder = web.Folders[url + "/" + foldername];
    var folder2 = web.Folders[url2 + "/" + foldername2];
    var folderA = web.Folders[urlA + "/" + foldernameA];
    var folderB = web.Folders[urlB + "/" + foldernameB];
    var folderC = web.Folders[urlC + "/" + foldernameC];
    if (!folder1.Exists && !folder.Exists && !folder2.Exists && !folderA.Exists && !folderB.Exists && !folderC.Exists)
    var folders1 = web.GetFolder(url1).SubFolders;
    var folders = web.GetFolder(url).SubFolders;
    var folders2 = web.GetFolder(url2).SubFolders;
    var foldersA = web.GetFolder(urlA).SubFolders;
    var foldersB = web.GetFolder(urlB).SubFolders;
    var foldersC = web.GetFolder(urlC).SubFolders;
    folders1.Add(foldername1);
    folders.Add(foldername);
    folders2.Add(foldername2);
    foldersA.Add(foldernameA);
    foldersB.Add(foldernameB);
    foldersC.Add(foldernameC);
    var file1 = web.GetFile(web.Site.Url + TemplateUrl1);
    var file = web.GetFile(web.Site.Url + TemplateUrl);
    var file2 = web.GetFile(web.Site.Url + TemplateUrl2);
    var fileA = web.GetFile(web.Site.Url + RfiTemplateUrl);
    var fileB = web.GetFile(web.Site.Url + DrawingTemplateUrl);
    var fileC = web.GetFile(web.Site.Url + TenderReturnTemplateUrl);
    if (file1 != null && file != null && file2 != null && fileA != null && fileB != null && fileC != null)
    var fileName = string.Format("{0}/{1}{2}", folder1.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 1 {0} to {1}...", file1.Name, fileName);
    var byteArray1 = file1.OpenBinary();
    var uploadedFile1 = folder1.Files.Add(fileName, byteArray1, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 1 Uploaded with new ID of {0}", uploadedFile1.Item.ID);
    this.EventFiringEnabled = false;
    var listitem1 = uploadedFile1.Item;
    listitem1["Name"] = this.projectName;
    listitem1["EnquiryNo"] = finalNum;
    listitem1["Project_Name"] = this.projectName;
    listitem1["Tender_Received"] = this.tenderReceived;
    listitem1["Tender_Return"] = this.tenderReturn;
    listitem1["Quotation_Analysis_Mech_Url"] = "https://groupportal.sharepoint.com/sites/EnginSouth/Quotation%20Analysis%20Mechanical/Forms/DispForm.aspx?ID=" + listitem1.ID;
    listitem1.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 1.");
    fileName = string.Format("{0}/{1}{2}", folder.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 2 {0} to {1}...", file.Name, fileName);
    var byteArray = file.OpenBinary();
    var uploadedFile = folder.Files.Add(fileName, byteArray, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 2 Uploaded with new ID of {0}", uploadedFile.Item.ID);
    this.EventFiringEnabled = false;
    var listitem = uploadedFile.Item;
    listitem["Name"] = this.projectName;
    listitem["EnquiryNo"] = finalNum;
    listitem["Project_Name"] = this.projectName;
    listitem["Tender_Received"] = this.tenderReceived;
    listitem["Tender_Return"] = this.tenderReturn;
    listitem["Quotation_Analysis_Elec_Url"] = "https://groupportal.sharepoint.com/sites/EnginSouth/Quotation%20Analysis%20Electrical/Forms/DispForm.aspx?ID=" + listitem.ID;
    listitem.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 2.");
    fileName = string.Format("{0}/{1}{2}", folderA.ServerRelativeUrl, this.projectName, ".docx");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 3 {0} to {1}...", fileA.Name, fileName);
    var byteArrayA = fileA.OpenBinary();
    var uploadedFileA = folderA.Files.Add(fileName, byteArrayA, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 3 Uploaded with new ID of {0}", uploadedFileA.Item.ID);
    this.EventFiringEnabled = false;
    var listitemA = uploadedFileA.Item;
    listitemA["Name"] = this.projectName;
    listitemA["EnquiryNo"] = finalNum;
    listitemA["Project_Name"] = this.projectName;
    listitemA["Date"] = this.docDate;
    listitemA["Description"] = this.description;
    listitemA["ProjectNo"] = this.projectNumber;
    listitemA["RFIUrl"] = "https://groupportal.sharepoint.com/sites/EnginSouth/EstimatingRFI/Forms/DispForm.aspx?ID=" + listitemA.ID;
    listitemA.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 3.");
    fileName = string.Format("{0}/{1}{2}", folderB.ServerRelativeUrl, this.projectName, ".docx");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 4 {0} to {1}...", fileB.Name, fileName);
    var byteArrayB = fileB.OpenBinary();
    var uploadedFileB = folderB.Files.Add(fileName, byteArrayB, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 4 Uploaded with new ID of {0}", uploadedFileB.Item.ID);
    this.EventFiringEnabled = false;
    var listitemB = uploadedFileB.Item;
    listitemB["Name"] = this.projectName;
    listitemB["EnquiryNo"] = finalNum;
    listitemB["Project_Name"] = this.projectName;
    listitemB["Date"] = this.docDate;
    listitemB["Description"] = this.description;
    listitemB["ProjectNo"] = this.projectNumber;
    listitemB["DrawingURL"] = "https://groupportal.sharepoint.com/sites/EnginSouth/Tender%20and%20Drawing%20Schedule/Forms/DispForm.aspx?ID=" + listitemB.ID;
    listitemB.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 4.");
    fileName = string.Format("{0}/{1}{2}", folderC.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 5 {0} to {1}...", fileC.Name, fileName);
    var byteArrayC = fileC.OpenBinary();
    var uploadedFileC = folderC.Files.Add(fileName, byteArrayC, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 5 Uploaded with new ID of {0}", uploadedFileC.Item.ID);
    this.EventFiringEnabled = false;
    var listitemC = uploadedFileC.Item;
    listitemC["Name"] = this.projectName;
    listitemC["EnquiryNo"] = finalNum;
    listitemC["Project_Name"] = this.projectName;
    listitemC["Date"] = this.docDate;
    listitemC["Description"] = this.description;
    listitemC["ProjectNo"] = this.projectNumber;
    listitemC["PricingURL"] = "https://groupportal.sharepoint.com/sites/EnginSouth/Est_Tender_Pricing_Document/Forms/DispForm.aspx?ID=" + listitemC.ID;
    listitemC.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 5.");
    fileName = string.Format("{0}/{1}{2}", folder2.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 5 {0} to {1}...", file2.Name, fileName);
    var byteArray2 = file2.OpenBinary();
    var uploadedFile2 = folder2.Files.Add(fileName, byteArray2, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 6 Uploaded with new ID of {0}", uploadedFile2.Item.ID);
    this.EventFiringEnabled = false;
    var listitem2 = uploadedFile2.Item;
    listitem2["Name"] = this.projectName;
    listitem2["EnquiryNo"] = finalNum;
    listitem2["Project_Name"] = this.projectName;
    listitem2["Date"] = this.docDate;
    listitem2["Team"] = this.team;
    listitem2["Estimator_Electrical"] = this.electrical;
    listitem2["Estimator_Mechanical"] = this.mechanical;
    listitem2["Status"] = this.status;
    listitem2["Tender_Received"] = this.tenderReceived;
    listitem2["Tender_Return"] = this.tenderReturn;
    listitem2["Sector"] = this.sector;
    listitem2["Design_Build"] = this.designBuild;
    listitem2["Build_Type"] = this.buildType;
    listitem2["Service_Prog_Start"] = this.serviceProgramStart;
    listitem2["Service_Prog_Completion"] = this.serviceProgramCompletion;
    listitem2["Client_1"] = this.client1;
    listitem2["Client_2"] = this.client2;
    listitem2["Client_3"] = this.client3;
    listitem2["Client_4"] = this.client4;
    listitem2["Consultant"] = this.consultant;
    listitem2["Pre-construction_Prog_Start"] = this.preConstructionProgramStart;
    listitem2["Pre-construction_Prog_End"] = this.preConstructionProgramEnd;
    listitem2["Tender_Summary_Url"] = "https://groupportal.sharepoint.com/sites/EnginSouth/TenderSummaryLib/Forms/DispForm.aspx?ID=" + listitem2.ID;
    listitem2.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 6.");
    /// <summary>
    /// Creates the folders.
    /// </summary>
    /// <param name="web">The web.</param>
    private void CreateFolders(SPWeb web)
    var projectListId = web.Lists.Add(this.projectName.Replace(' ', '_'), string.Empty, SPListTemplateType.DocumentLibrary);
    var projectList = web.Lists[projectListId];
    projectList.OnQuickLaunch = true; // The document library will appear in Quick Launch bar.
    CreateFolder(projectList, "1.Tender Documents");
    CreateFolder(projectList, "2. Electrical");
    CreateFolder(projectList, "3. Mechanical");
    CreateFolder(projectList, "4. Correspondance");
    CreateFolder(projectList, "5. Settlement Meeting Docs");
    CreateFolder(projectList, "6. Tender Return Docs");
    CreateFolder(projectList, "7. Tender Handover");
    projectList.Update();
    /// <summary>
    /// Initializes the specified list item.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="finalNum">The final number.</param>
    private void Initialize(SPListItem listItem, string finalNum)
    var contextId = string.Format("List:{0}, Id:{1}", listItem.ParentList.Title, listItem.ID);
    this.noBid = AssignField(listItem, "Bid", contextId);
    this.projectName = AssignField(listItem, "Project_Name", contextId);
    var teamlookup = AssignField(listItem, "Team", contextId);
    var lookupParts = teamlookup.Split(new[] { ";#" }, StringSplitOptions.None);
    this.team = lookupParts[1];
    this.description = AssignField(listItem, "Description", contextId);
    this.status = AssignField(listItem, "enquiry_status", contextId);
    this.electrical = AssignUserField(listItem, "electrical_proj_manager", contextId);
    this.mechanical = AssignUserField(listItem, "mechanical_proj_manager", contextId);
    this.docDate = AssignDateField(listItem, "Date", contextId);
    this.tenderReceived = AssignDateField(listItem, "Tender_Received", contextId);
    this.tenderReturn = AssignDateField(listItem, "Tender_Return", contextId);
    this.preConstructionProgramStart = AssignDateField(listItem, "Pre-construction_Prog_Start", contextId);
    this.preConstructionProgramEnd = AssignDateField(listItem, "Pre-construction_Prog_End", contextId);
    this.sector = AssignField(listItem, "Sector", contextId);
    this.designBuild = AssignField(listItem, "Design_Build", contextId);
    this.buildType = AssignField(listItem, "Build_Type", contextId);
    this.serviceProgramStart = AssignDateField(listItem, "Service_Prog_Start", contextId);
    this.serviceProgramCompletion = AssignDateField(listItem, "Service_Prog_Completion", contextId);
    this.client1 = AssignField(listItem, "Client_1", contextId);
    this.client2 = AssignField(listItem, "Client_2", contextId);
    this.client3 = AssignField(listItem, "Client_3", contextId);
    this.client4 = AssignField(listItem, "Client_4", contextId);
    this.consultant = AssignField(listItem, "Consultant", contextId);
    if (this.status == "Won")
    this.projectNumber = string.Format("15-{0}-{1}", this.team, new Random().Next(0, 9999).ToString("D4"));
    if (this.status == "Active" || this.status == "Closed")
    this.projectNumber = "No Project No";
    listItem["ProjectNo"] = this.projectNumber;
    listItem["EnquiryNo"] = finalNum;
    listItem.Web.AllowUnsafeUpdates = true;
    listItem.SystemUpdate(false);

    Hi,
    In this forum we mainly discuss questions and feedbacks about Office client products, as your question is about SharePoint 2013, I suggest you post this thread in SharePoint forum:
    https://social.technet.microsoft.com/Forums/office/en-US/home?category=sharepoint
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Cannot access SharePoint 2013 publishing site

    HI,
    I set up a SharePoint 2013 and everything seemed to work fine (setup was basically done using the codeplex autoinstaller script).
    But now I detected, that I have an issue with the publishing feature. Regardless of whether I activate this feature on an existing site collection or whether I create a new site collection with the Publishing Portal template, I cannot access the site. Even
    not with the site collection administrator account.
    I tried to assign the Central-Admin app-pool to the website (found this hint several times), but it doesn't solve the issue.
    In the ULS logs, I found the following:
    SPRequest.GetAclForScope: UserPrincipalName=i:0).w|s-1-5-21-3951779234-2814364508-2306989609-1113, AppPrincipalName= ,bstrWebUrl=http://krom.devnet.local/sites/pub ,guidScopeId=dff5401d-7fa6-4868-bcfe-ece146d7e275 ,fRequirePermissionCheck=True
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   
    at Microsoft.SharePoint.SPReusableAcl..ctor(SPRequest request, String webUrl, Guid scopeId, Boolean requirePermissionCheck)    
    at Microsoft.SharePoint.Publishing.AclCache.GetAclForScope(Guid scopeId, Boolean disposeOfSite)    
    at Microsoft.SharePoint.Publishing.WebControls.ConsoleXmlUtilities.ConfigurationXml(String configProvider, Boolean isBuiltInConfigFile)    
    at Microsoft.SharePoint.Publishing.WebControls.ConsoleXmlUtilities.GetConsoleNodeCollection(String configXml, ConsoleNode prePopulatedRootNode)    
    at Microsoft.SharePoint.Publishing.WebControls.ConsoleXmlUtilities.GetConsoleNodeCollectionFromXmlFile(String configName, Boolean isBuiltInConfigFile)    
    at Mi...
    ...crosoft.SharePoint.Publishing.WebControls.XmlConsoleDataSource.LoadTreeFromConfigXml()    
    at Microsoft.SharePoint.Publishing.WebControls.XmlConsoleDataSource.OnLoad(EventArgs e)    
    at Microsoft.SharePoint.Publishing.WebControls.PublishingSiteActionsMenuCustomizer.OnLoad(EventArgs e)    
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfte...
    ...rAsyncPoint)    
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at System.Web.UI.Page.ProcessRequest()    
    at System.Web.UI.Page.ProcessRequest(HttpContext context)    
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)    
    at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)    
    at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)    
    at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNo...
    ...tificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    
    at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)    
    at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr native...
    ...RequestContext, IntPtr moduleData, Int32 flags)  
    Access Denied. Exception: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:  
    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetAclForScope(String bstrWebUrl, Guid guidScopeId, Boolean fRequirePermissionCheck, Object& pvarAcl, UInt64& lAnonymousMask)    
    at Microsoft.SharePoint.Library.SPRequest.GetAclForScope(String bstrWebUrl, Guid guidScopeId, Boolean fRequirePermissionCheck, Object& pvarAcl, UInt64& lAnonymousMask).
    Exception in file C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Layouts\EditingMenu\SiteAction.xml: Thread was being aborted.
    Any ideas, what causes this issue and how to solve it?
    Thanks!!

    No, I created the sub site from central admin and after creation succeeded was never able to access it - so no custom apps there. This only happens, if I create the site collection with publishing portal template - team site template for example works fine.
    I took a look into the IIS log and found the following:
    2012-11-19 14:24:33 fe80::55a3:a2df:7e9d:eb59%12 GET /_layouts/15/user.aspx obj={C701B918-B686-42B4-B1C5-B68FA4B2419F},doclib&list={C701B918-B686-42B4-B1C5-B68FA4B2419F} 80 0#.w|devnet\administrator fe80::55a3:a2df:7e9d:eb59%12 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.2;+WOW64;+Trident/6.0;+.NET4.0E;+.NET4.0C;+.NET+CLR+3.5.30729;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.30729)
    - 302 0 0 104
    2012-11-19 14:24:33 fe80::55a3:a2df:7e9d:eb59%12 GET /_layouts/15/AccessDenied.aspx Source=http%3A%2F%2Fkrom%2Edevnet%2Elocal%2Fsites%2Fpub%2F%5Flayouts%2F15%2Fuser%2Easpx%3Fobj%3D%7BC701B918%2DB686%2D42B4%2DB1C5%2DB68FA4B2419F%7D%2Cdoclib%26list%3D%7BC701B918%2DB686%2D42B4%2DB1C5%2DB68FA4B2419F%7D&Type=list&name=%7B1AC4E1A1%2D0C23%2D4203%2D96A2%2D419EC36CFDAD%7D
    80 0#.w|devnet\administrator fe80::55a3:a2df:7e9d:eb59%12 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.2;+WOW64;+Trident/6.0;+.NET4.0E;+.NET4.0C;+.NET+CLR+3.5.30729;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.30729) - 200 0 0 30
    The list that is mentioned in the source-URL (ID starts with C701B918) is the Pages list - I checked this in SharePoint Designer. So it seems that I have no access to the Pages library and that would explain why I can't access the page..
    But why do I not have permission? And: how can I fix this? I tried the following powershell script but still no access to the pages library.
    PS C:\Users\administrator> $web = get-spweb
    http://krom.devnet.local/sites/pub
    PS C:\Users\administrator> $account = $web.ensureuser("devnet\administrator")
    PS C:\Users\administrator> $role = $web.RoleDefinitions["Contribute"]
    PS C:\Users\administrator> $list = $web.lists["Pages"]
    PS C:\Users\administrator> $list.breakroleinheritance($true)
    PS C:\Users\administrator> $assignment = new-object microsoft.sharepoint.sproleassignment($account)
    PS C:\Users\administrator> $assignment.roledefinitionbindings.add($role)
    PS C:\Users\administrator> $list.roleassignments.add($assignment)
    PS C:\Users\administrator> $list.update()
    PS C:\Users\administrator> $web.dispose()
    I also cannot change permission with SharePoint Designer because it just tries to open the related SharePoint page in browser and exactly is what I'm not allowed to do :-(

  • How to delete Content Source in Sharepoint 2013 Search Service

    I want to delete Default Content Source in Search
    Service in SharePoint 2013 but delete button is disable?Please see the below image. Content Source Type=SharePoint Sites
    How to do it?
    If In Content Source type=Files than delete button enables but
    not for the Content Source type=Sharepoint sites
    Vishal Goyal

    Hi,
    try to remove it using powershell
    $searchapp = Get-SPEnterpriseSearchServiceApplication "NameofSearchAPp"
    Remove-SPEnterpriseSearchCrawlContentSource -SearchApplication $searchapp -Identity "Name"\Regards
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • In SharePoint 2013 navigation, is it possible to add a custom link only to the left-hand menu without getting it in to the top menu dropdown?

    If I want to add a custom link to the left-hand navigation menu In a SharePoint 2013 sub-site, it can be done by visiting
    Site Settings à Navigation section and adding the link under
    Structural Navigation: Editing and Sorting section. However, this will automatically add a matching link to the top menu as a dropdown.
    (Note that Global Navigation is set to “Display the same navigation items as the parent site” where “Parent is using Structural Navigation.” and Current Navigation is set to “Structural Navigation:
    Display only the navigation items below the current site”)
    Is there a way to just add a custom link only to the left-hand menu without getting it in to the top menu dropdown?

    Hi Asanka,
     Please refer the below link which may help you to resolve your problem.
    http://blog.navantis.com/configuring-sharepoint-2013-navigation-to-span-site-collections/
    If its not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

Maybe you are looking for

  • Error 1603. Photoshop CS4

    Alright, so I recently got Photoshop CS4, for some odd reason when I had to do a system restore, it messed up. Not sure why, but I got the screen to accept or decline the user end license agreement, when I clicked to accept it, it just went away and

  • Removed songs from iTunes or iPhone keep syncing - where are they and how to permanently stop syncing?

    I have about 26 songs that were purchased from iTunes that continually sync from iTunes to my iPhone.  I have removed them from my phone and have removed through iTunes, but every time I sync my phone with iTunes they come back. I have "manually mana

  • IPhoto for iOS removes the GPS exif data from the photo after an edit

    iPhoto for iOS removes the GPS exif data from the photo after an edit Using the iPhone camera, I take a photo and then I want to make the photo a little brighter. So, I edit a photo using iPhoto for iOS and then save the photo back to the camera roll

  • HT3399 Function keys vs volume keys

    I used to be able to use the "Show all windows" + "Show desktop" shortcuts and the volume keys all with one touch. Now with Mavericks it seems you have to choose, can't have both?? So frustrating. Any suggestions/workarounds?

  • Need new serial number for Photoshop Elements 6 - how to get?

    I purchased Photoshop Elements 6 for my mom back in 2007. She's FINALLY getting around to installing it today and it keeps giving her an invalid serial number error. So I loaded her up on Team Viewer to make sure she's doing everything correctly (she