Support for long-running operations using the MOSS publishing infrastructure

I have used the Long Running Operation feature in the MOSS Publishing Infrastructure (SharePoint) in the past, and I wonder if anyone knows if this supports a supported method for custom long running operations in SharePoint.

When using this method, you inherit Microsoft.SharePoint.Publishing.Internal.LongRunningOperationJob, which seems to indicate that it is not supported for custom use, but I seem to recall (maybe I dreamed?) That Processes were a MOSS selling feature.

Any ideas?

+3
source share
4 answers
+2

! SharePoint. LongRunningOperationJob , WSS 3.0. , - ASPX AJAX, . , . , IISRESET . SharePoint.

+1

SPLongOperation - . , Publishing.LongRunningOperationJob .

+1

- , Microsoft SharePoint 2007?

SPLongOperation is the class to use. It has 2 important methods.

Beginning and the end;

All your code that has been running for a long time is placed between the beginning and the end.

The following is an example class.

It is almost simple and simple :-)

using System;
using System.Web;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;
namespace CreateLongOperation
{
public class LongRun : System.Web.UI.Page
{
  protected Button buttonOk;

  protected void Page_Load(object sender, EventArgs e)
  {
     buttonOk.Click += new EventHandler(buttonOk_Click);
  }

  void buttonOk_Click(object sender, EventArgs e)
  {
     SPLongOperation operation = new SPLongOperation(this.Page);

     operation.Begin();

     // do long operation code here...
     System.Threading.Thread.Sleep(6000);

     operation.End("http://sps/_layouts/Mynewpage.aspx");
  }
 }
}
+1
source

Source: https://habr.com/ru/post/1706729/


All Articles