Email through Event receiver in SharePoint Online

Hi,
I am creating an event receiver for custom list which will send email to users in sharepoint online.
I am using the following code to send email through event receivers in sharepoint.
            MailMessage mMailMessage = new MailMessage();
            mMailMessage.From = new MailAddress("[email protected]");
            mMailMessage.To.Add(new MailAddress("[email protected]));
            mMailMessage.Subject = "subject1";
            mMailMessage.Body = "just a body";
            mMailMessage.IsBodyHtml = true;
            SmtpClient client = new SmtpClient("smtp.office365.com", 587)
                Credentials = new NetworkCredential("[email protected]", "****"),
                EnableSsl = true,
               UseDefaultCredentials = false,
          client.Send(mMailMessage);
NOTE: I am using MailMessage() because it is in the sandbox solution.
However I am facing the following error :
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
It may be because I am trying to use SMTP server of sharepoint Online,However I am not able to connect it.
Can anybody help me and can advice how to send email programmatically from sharePoint online ?
Thanks
Jhalak

In Office 365, there's no direct way to send an email programmatically because the SPUtility.SendEmail
Method isn't available in sandboxed solutions. The workaround is to use the Send an Email action in a list workflow.
For further detail: http://visualstudiomagazine.com/blogs/tool-tracker/2012/04/send-an-email-in-office-365.aspx

Similar Messages

  • Conflict between Client object model and Item Updated Event Receiver in sharepoint 2010

    Hello All,
    As per my requirement I have a two custom list.
    Agent Details
    Port Name
    Agent Details contains Agent code, Port Name,  email, address and phone of Agent. Its possible that one Agent Code is connected with multiple Port Name.
    Basically what I am doing is I am getting port name connected with Agent code, using jquery and bind those values with check box(using javascript created dynamically) and bind all with Div tag.
    Now when my custom edit form of Agent list open up it shows me different port name binding with checkbox group.
    when user select the check box and click confirm button my clicent object model script will run and add this selected value into Port Name list. 
    After confirm one more button named Save will enable asking user to edit the email, phone or address value and when I click on save my Item updated event fires which update the values of the selected port name(These port name I am getting from port
    name list) to Agent Details custom list.
    Now when I am trying to update the values my event receiver fires or some times it got stuck(not firing). So could you please help me the possible alternative for this requirements.
    Can we user the Ecma Script(Client object model to preserve the value of selectec port) and Item updated event receiver on the same time?
    Is anything am doing wrong then please guide me.

    Hi,
    As I understand, when you updated values in the agent details list the Item updated event receiver got stuck sometimes.
    The item update event receiver will fire after the item has been saved, and the client object model script or the Ecma Script runs before the item is saved, so there is no conflict between the client object model script and item update event receiver.
    You could find out the reason about the item update event receiver gets stuck by debugging the event receiver.
    When you want to debug your event receivers, you have to attach to OWSTIMER.EXE and wait till they are executed. You can control this behavior using the Synchronization attribute. Also, if you’re looking for an easy way to debug an event receiver without
    having to manually attach a debugger to your code, you can use the System.Diagnostics.Debugger.Launch() method.
    The articles below are about how to debug in the event receiver in SharePoint 2010.
    http://sharepoint-kings.blogspot.jp/2013/02/debugging-event-receivers-in-sharepoint.html
    http://chakkaradeep.com/index.php/event-receivers-in-sharepoint-2010/
    http://sharesaint.com/?p=77
    Best regards,
    Sara Fan
    TechNet Community Support
    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]

  • Getting Error In Item Added Event In Event Receiver in SharePoint 2010

    Hi Guys,
    I have written Event Receiver in SharePoint 2010 On ItemAdded event of Document Library. Wants to increment a col value by reading maximum value first. I wrote below code but sometime it works correctly but some time I got below error: Document Set
    enabled on this document library and weh we added any document in any document set then this event occurred. I mentioned Code block and Error description both.
    Please see and suggest right solution.
    Code:
    public override void ItemAdded(SPItemEventProperties properties)
                    base.ItemAdded(properties);
                    SPListItem _currentItem = properties.ListItem;
                    string _QUERY = @"<Where><Eq><FieldRef Name='DocumentId'/><Value Type='Text'>21</Value></Eq></Where><OrderBy><FieldRef
    Name='RevisionReference' Ascending='False' /></OrderBy><ViewFields><FieldRef Name='RevisionReference' /></ViewFields><QueryOptions><Folder>DocumentLIBB/</Folder></QueryOptions>";
                    int maxID = 0;
                    string revisionreferencee = string.Empty;
                    using (SPWeb web = properties.OpenWeb())
                        SPList list = web.Lists["DocumentLIBB"];
                        SPQuery query = new SPQuery();
                        query.ViewAttributes = "Scope=\"Recursive\"";
                        query.Query = (_QUERY);
                        SPListItemCollection results = list.GetItems(query);
                     if (results.Count > 0)
                            SPListItem item = results[0];
                            revisionreferencee = item["RevisionReference"].ToString();
                            bool result = Int32.TryParse(revisionreferencee, out maxID);
                            _currentItem["RevisionReference"] = maxID + 1;
                            _currentItem["DocumentId"] = item["DocumentId"].ToString();
                    properties.ListItem.File.Update();
                    _currentItem.Update();
    Error Desc:
    <nativehr>0x81020015</nativehr><nativestack></nativestack>The file EKENg LIBB/QA_DOC_044/05-22 Emirates Engineering Occurrence_Error Investigation - MEDA Process - 27 AUG 2009-921.doc has been modified by SHAREPOINT\system
    on 27 Aug 2012 12:10:13 +0400.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Runtime.InteropServices.COMException: <nativehr>0x81020015</nativehr><nativestack></nativestack>The file EKENg LIBB/QA_DOC_044/05-22 Emirates Engineering Occurrence_Error Investigation - MEDA
    Process - 27 AUG 2009-921.doc has been modified by SHAREPOINT\system on 27 Aug 2012 12:10:13 +0400.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Making the event synchronous (rather than the default) eliminates this error. If such a change suits your requirements you should consider it. You just have to tweak the elements.xml in your feature receiver project;
    http://blogs.msdn.com/b/unsharepoint/archive/2010/11/10/sharepoint-event-receivers-making-asynchronous-event-synchronous-to-avoid-save-conflict-error.aspx
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | c: http://www.b-i.com

  • Modify email invitation/alert content in sharepoint online

    Hi, its a known bug that we can't modify the email notification messages thats being sent from sharepoint online site to the users. Just wanted to make sure microsoft has not yet make any update for this. ? or any other alternate / hack for this? Basically
    i want to send a custom email when people 'share' something in my office365 site. 
    Thanks, Saravanan PRS

    Yammer should be available with your O365 subscription today, but you would have to switch to it within the SharePoint Online tenant settings.
    That said, end users can subscribe to Yammer groups, or specific tags, or specific users.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Can I configure incoming email to a Calendar in SharePoint Online 2013?

    I'd like to send invitations from my Outlook Calendar to my SharePoint Calendar inSharePoint Online 2013. Is there a way to do this? I've searched and see that I need to change the Incoming Mail Settings, but that doesn't appear under
    Communications in SharePoint Online.   I'm not sure how to configure the Incoming Mail Settings to appear under Communications in SharePoint Online.

    Hi Kathy..
    http://technet.microsoft.com/en-us/sharepoint/Video/ff679958
    http://technet.microsoft.com/en-us/library/cc262947.aspx
    http://sharepointgeorge.com/2010/configuring-incoming-email-sharepoint-2010/
    And this site has a pretty good description of what you'll need to do with the calendar list to configure it:http://www.ehow.com/how_5916432_use-sharepoint-calendar-list-email.html
    http://office.microsoft.com/en-in/outlook-help/view-and-update-a-sharepoint-calendar-HA010081987.aspx

  • Send Email to Anonymous user thoruhg Sharepoint online custom web part

    Hi All
    Can you please suggest me how we can send Email to anonymous user?
    I have create the custom contact us web part as a sandbox solution (For SharePoint Online public facing site) with following fields
    Name: txtName
    Email: txtEmail
    Phone No: txtPhoneNo
    Company Name: txtCompany
    Message: txtMessage
    Now I want to send the Email (txtEmail) to anonymous user which have fill the contact us form.
    Note:  I am using SharePoint Online public facing site
    Thanks
    Deepak Chauhan
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

    Hi Mokhtar
    I have solved my problem Email send properly but i am using SharePoint online site when
    we log In and then fill the contact us form so that mail send properly but when anonymous user fill the contact us form without log In so
    that Email not send can you please suggest me how workflow work for anonymous user 
    Thanks
    Deepak
    Chauhan
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

  • Change Email Sender[Site Name] of Sharepoint Online Workflow

    Is there any way to change the name of the Sender to List name rather than Site Name of a workflow that sends email?
    Please see screenshots below for guidance.
    The email from the workflow shows that the email came from ISO Manuals, but I want to change it to the list name sample EMS Manuals which the item is located and the workflow is running through that particular list item.
    Site Name - ISO Manuals
    Lists Name -      EMS Manuals
    Engineering Manuals
    Agri Manuals
    This is the sample email generated from Workflow.
    Please help.
    Best Regards,
    Ching

    Hi ching, I don't believe that's possible. See this thread-
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/22d95510-95b7-4882-b988-4038e59fb031/action?threadDisplayName=how-to-change-the-display-name-for-sharepoint-emails-sent-using-workflows
    cameron rautmann

  • Handling ItemAdding Event in event receiver in sharepoint 2010.

    public override void ItemAdding(SPItemEventProperties properties)
    base.ItemAdding(properties);
    SPItem itemBeingAdded = properties.ListItem;
    var startTime = itemBeingAdded["Start Time"]; // does not give any value
    // Some code goes here.
    I am firing this event while adding an item in a calender list. It is getting fired. No problem. But I am not getting any value from properties.
    In the above code startTime gives
    me nothing. Actually, I want to access the column field of the item (properties in
    my case) is being added.
     Problem is in the ItemAdding method.
    ItemUpdating is working fine.
    public override void ItemUpdating(SPItemEventProperties properties)
    base.ItemUpdating(properties);
    SPItem itemBeingAdded = properties.ListItem;
    var startTime = itemBeingAdded["Start Time"]; //always gives me value
    How can I do it in ItemAdding method. 

    Use AfterProperties instead.
    http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spitemeventproperties.afterproperties(v=office.15).aspx
    http://srisharepointdevelopment.blogspot.com/2013/06/beforeproperties-and-afterproperties-in.html
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Not generate file using ItemAdded Event in SharePoint Online

    I develop a list item event receiver For Sharepoint online.I upload the .wsp file in solution and activate the feature On ItemAdded event I create/generate document on 15 document library based on library template.
    Some time it generate all 15 files and sometime it generate 8/10/12 files.
    i.e not generate files in all the document library.
    It work fine in my local server.
    Please Help me.

    &nbsp;****1.design_Pre_Order_Meeting_Template [=========== ] System.ArgumentException: Value does not fall within the expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****2.design_Checklist_T [=========== ] System.ArgumentException: Value does not fall within the expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****3.design_Drawing_Change_Schedule [=========== ] System.ArgumentException: Value does not fall within the
    expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****4.design_Responsibility_Matrix_Template [=========== ] System.ArgumentException: Value does not fall within
    the expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****5.design_Review_Record_Template [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****6.design_Risk_Assesment_Template [=========== ] System.ArgumentException: Value does not fall within the
    expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****7.design_Supplier_Material_Sheet [=========== ] System.ArgumentException: Value does not fall within the
    expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****8.design_Team_Meeting_T [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****9.pc_Key_Isssue_Schedule [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****10.pc_Client_Progress_Report [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****11.pc_Design_Change_Register [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****12.pc_rfi_schedule [=========== ] System.ArgumentException: Value does not fall within the expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****13.pc_Drawing_Progress_Schedule_T [=========== ] System.ArgumentException: Value does not fall within the
    expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****14.pc_Technical_Submittal_Schedule [=========== ] System.ArgumentException: Value does not fall within the
    expected range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****16.pc_Drawing_Issue_Schedule [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****19.proc_Pre_Order_Meeting_T [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties) ****20.proc_Preferred_Supplier_List [=========== ] System.ArgumentException: Value does not fall within the expected
    range.
    Server stack trace:  
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:  
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    &nbsp;&nbsp;&nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb_SubsetProxy.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile__Inner(String strUrl)
    &nbsp;&nbsp;&nbsp;at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
    &nbsp;&nbsp;&nbsp;at new_contract_request.pc_contract_request_form.pc_contract_request_form.ItemAdded(SPItemEventProperties properties)

  • Event Receiver to get folder Names from List View Web Part

    Hi,
    We have a requirement i.e.
    On one of the page,there are some folders on the list view web part.
    Now through event receiver i should pick the folder names from list view web part and
    update the same in the list.
    If that names already exists in the list then we should leave without updating,if not we have to add folder name in the list.
    Please share your ideas regarding the same.
    Regards,
    Naga Sudheer M
    Thanks & Regards, Sudheer

    Hello,
    LVWP is just for displaying content of site so you need to associate your event receiver with actual list/library. You can create ItemAdded event receiver to check existing folder and create new if not existing. "sk2014" links are good to start.
    http://sharepoint.stackexchange.com/questions/59788/change-name-in-itemadding-event-receiver-or-create-a-new-item
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • "Invalid text value" error when calling a web service from a workflow in SharePoint Online

    I'm trying to create a workflow that loops through a list in SharePoint Online using a REST web service call. However, I'm having
    some trouble trying to pass the authentication token as described in the following article.
    http://www.fabiangwilliams.com/2013/09/03/more-on-sharepoint-2013-r...
    Basically, the workflow stops right at the "Call web service" action, and the only error it tells me is the following.
    Invalid text value.
    A text field contains invalid data. Please check the value and try again
    Has anyone had success with web service calls to SharePoint Online?
    Dan Kreitz, Solutions Architect, Séafra Inc.

    Hi DanPoint,
    Thank you for your sharing!
    Best Regards,
    Wendy
    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]
    Wendy Li
    TechNet Community Support

  • SharePoint online 2013 event receiver error

    I am currently working on a SharePoint online project. 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.
    namespace ExcelGen.ExcelGenReceiver
    using System;
    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://my site url/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://my site url/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://my site url/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://my site url/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://my site url/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://my site url/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]

  • 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]

  • The underlying connection was closed: An unexpected error occurred on a receive..Exception.Message - while executing powershell command for sharepoint online site

    " +The underlying connection was closed: An unexpected error occurred on a receive..Exception.Message " OR sometimes
    "The remote server returned an error: (503) Server Unavailable..Exception.Message"
    Getting exception above when performing various operation (site coll creating, group creation, adding users to group) for sharepoint online (Office 365) site using powershell script.
    I want to create 3500 site collections using PS script. In-between getting above exception so it will skip one site collection creating and working again. for eg. after creating 11 site coll, script will through above exception and so 12th site coll will
    not be create but working fine from 13 and so on...

    Remote server seems working to me...any additional check?
    if problem with remote server then may be loop to create site provisioning should not start again..Right?
    any idea?

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

Maybe you are looking for

  • Problem with Set/Get volume of input device with single channel

    from Symadept <[email protected]> to Cocoa Developers <[email protected]>, coreaudio-api <[email protected]> date Thu, Dec 10, 2009 at 2:45 PM subject Problem with Set/Get volume of input device with single channel mailed-by gmail.com hide details 2:

  • Does the iPhone 5 support Sprint's 4G Wimaxx?

    this is the answer i got from an Apple Support representative before he disappeared without saying anything: Now Chatting with Kaeleb Hi, welcome to the US Apple Online Store.  How are you? does the iphone 5 work on sprints 4g wimaxx and 4g lte? Yes

  • Re-Recording DVD+RW disks?

    I have a LaCie d2 DVD±RW drive and was planning to use DVD+RW disks to (hopefully) re-record iPhoto library backups, ITunes backups, etc. I wanted to use the same disks every month, instead of using DVD+R or DVD-R disks and throwing them out. Well, a

  • Parsing xml with multiref

    Hi, We received from web service a xml: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:aaaa soapenv:e

  • Install Snow Leopard in a Lion partition

    Lion installed on a MacBook Pro without problems. I created a partition in Lion for Snow Leopard. Using original MacBook Pro installation disk, started to install, but I quit when I was not sure whether the install would overwrite Lion or give me an