How to ensure the SharePoint 2010 workflows end in given period

Many question has been asked about this problem.

in SharePoint Best Practices;

* For performance consideration ; you have to plan your timer jobs will always finish on time.
* You need to choose appropriate schedule interval to do it.

But this is not suitable for every condition ; Let me give some information about the issue.

You have planing to develop a custom timer job  for example this job has responsible to get some remote data from a remote System in 1 minute interval .
And what if the remote operation has taken more than 60sec. or what if that the timer job has faced with some problems and not getting finished itsjob in given period. You got the idea 🙂

In some conditions ; you may need to ensure no matter what ,the timer job has to be finished its job in given period . and If doesnt , you may want to terminate the running instance of the timer job and start a new instance of it.

The problem is here ;

If a timer has over its period and continue to running ; After the period has elapsed the new instance wont be started by  default behaviour of the SharePoint.
In SharePoint there is no way to run  two instance of a same timer job definition at same time

And even you have implemented some control logic in that timer job which responsible for the check and terminate if previous instance has running to stop it. It doesnt work because the timer job code wont be run again so it is never step through the SPTimerJob.Execute() method one more time.

And there is no way in OOB configuration to provide this functionality.

Resolution;

Resolution of this problem is easy but tricky. First you need to have 2 timer job.

EnsureTimerJobFinished

1)  Controler Timer job: (Scheduled) Has responsible to run worker timer job in defined interval and responsible to timing. (if the worker timer job has still running it can kill the previous one and start a new instance)

2)  Worker Timer Job. (Once) : Does the execute actual operation.

3)  If the Controler has detected that the previous instance of the worker timer job still running. It can terminate it. (Or you can extend your solution and make your own decision here)

4) After termination , The Controller can run another instance of the worker timer job.

August CU 2013 has been released.

August 2013 CU for SharePoint 2013 has been released
http://blogs.technet.com/b/stefan_gossner/archive/2013/08/14/august-2013-cu-for-sharepoint-2013-has-been-released.aspx

August 2013 CU for SharePoint 2010 has been released
http://blogs.technet.com/b/stefan_gossner/archive/2013/08/14/august-2013-cu-for-sharepoint-2010-has-been-released.aspx

Note For SP2:
* It is recommended to install June 2013 CU before SP2. June 2013 CU might not correctly identify the SP2 baseline. If SP2 has already been installed and June CU does not install you need to install  August CU which will correctly identify the SP2 baseline.

SharePoint 2010 SP2 has been released

Please be aware that SP2 is now available for Office 2010 and SharePoint 2010 as well as the other server products.

The SP2 release improves the compatibility of the Office and SharePoint 2010 products with Windows 8, Internet Explorer 10, Office 2013, and SharePoint 2013. It also addresses security, stability, and performance and contains all the Cumulative Updates (CU)and Public Updates (PU) that have released since SP1, starting with the June 2011 CU and July 2011 PU and ending with the April 2013 CU and May 2013 PU.

SharePoint Server 2010 SP2
http://support.microsoft.com/kb/2687453
SharePoint Foundation 2010 SP2
http://support.microsoft.com/kb/2687464

*Unlikely the previous SP1 , if you have SharePoint Server 2010 installation you don’t need to install SharePoint Foundation 2010 SP2 first, SharePoint Server SP2 already contains this update.

Server Language Pack SP2
http://support.microsoft.com/kb/2687462
SharePoint Foundation 2010 Language Pack SP2
http://support.microsoft.com/kb/2687466

Project Server 2010 SP2
http://support.microsoft.com/kb/2687452
Search Server 2010 SP2
http://support.microsoft.com/kb/2687461
SharePoint Designer 2010 SP2
http://support.microsoft.com/kb/2687463

* It is recommended to install June 2013 CU before SP2. June 2013 CU might not correctly identify the SP2 baseline. If SP2 has already been installed and June CU does not install you need to wait for August CU which will correctly identify the SP2 baseline.

* our Service Packs are cumulative. You can install SP2 directly on RTM.

Here you can find some changes with SharePoint SP2

  • Navigating to a SharePoint site with a BlackBerry device may open a non-mobile page.   Adding RIM6 into compat.browser allows users to access SharePoint pages and view documents in mobile view.
  • If anonymous access is enabled for Sharepoint 2010 SP1 (or later Cumulative Update), attempts to to access the site via a mobile device will receive an authentication prompt.
  • Customers are unable to use spell check in Korean when running SharePoint on Windows Server 2012.
  • Displaying Summary Links Web Part in personalizing view; generating confusing error message.
  • Deployment fails for content types containing a formula field in Italian.
  • File attachments are not deleted due to incorrect URL formatting
  • If requireExactUrl is not set for openweb calls, the PublishingWeb constructor may spawn variation pages  into incorrect locations while attempting re-creation of failed label during create hierarchies.
  • Incremental content deployment fails, giving the following error: FatalError: The given key was not present in the dictionary
  • Spell Checker doesn’t work properly with Internet Explorer 10.
  • Rich text editor spell checker may work incorrectly on 64 bit machines.
  • Customers encounter issues sending e-mail from workflows when the From address uses a non-Unicode character set.
  • Updated VBE7.dll to fix safe array corruption for x64 hosts when calling UDF methods using safe array arguments directly from the host.
  • SQL exceptions will appear in the log when running update statistics timer.
  • Improved performance of the AllUserData table.
  • Getting a feed against a discussion board fails if feed contains more than zero items.
  • SharePoint 2010 client object model now has compatibility for accessing Sharepoint 2013 servers.
  • Windows 8 users with Internet Explorer 10 receive an error when trying to open a document from SharePoint 2010 directly in the Office client.
  • Call GetChanges won’t return changes in certain cases where the change log has been edited and no parameters are set.
  • STSAdm MigrateUser fails when SQL server is not in domain.
  • Attempting to delete a child web from site settings causes the page to fail.
  • There is no exposed method to recalculate the second stage recycle bin size.
  • April 2011 Calendar View does not display correctly with Amman System Time zone
  • Users can create a scenario where a site loses permissions.
  • After deleting a web that contains historical document versions in the RecycleBin, rows are abandoned in the database.  These rows bloat the size of the database, causing difficulty with database management operations such as backup/restore, complicating upgrade and other scenarios.
  • After creating alerts on a document library with unique permissions and moving the contents using SPFolder.MoveTo method, the permissions seem to be lost and even the farm administrator is not able to delete these alerts.

More Resources:
http://blogs.technet.com/b/office_sustained_engineering/

http://blogs.office.com/b/sharepoint/archive/2013/07/23/check-out-the-sharepoint-server-2010-service-pack-2.aspx

Note: Due to required changes to the Prerequisite Installer, Service Pack 2 cannot be slipstreamed into installation media for use with installation on Windows Server 2012 systems.  Installation of SharePoint Server 2010 with Service Pack 2 on Windows Server 2012 systems requires an integrated Service Pack 2 installation media due
following the patch release.

Unable to send email from SharePoint

You have configured your SharePoint Outgoing Email but even the configuration correct you could not able to send emails from SharePoint.
For more information about how to configure outgoing emails on SharePoint please check following article:
http://technet.microsoft.com/en-us/library/cc263462.aspx

So what you can do;

First Check the ULS Logs ; You may facing following error;

Failed attempt 1 sending mail to recipients: bugra@contoso.com . Mail Subject: System Account has invited you “Blog Members”.
Error: SmtpException while sending
email: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1
Client was not authenticated
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode,
String response)     at
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode,
SmtpFailedRecipientException&

 

Usually this problem not caused by SharePoint it self, It is happening when SharePoint connects to Exchange server but Exchange is not authorize SharePoint to send emails. Why ? Because by design SharePoint use anonymous authentication to connect Exchange and OOB you can not configure SharePoint for any other authentication for using SMTP emails . If the recieve connector of the Exchange will require authentication that would be the problem .

You can test your stmp server by telnet client for anonymous authentication. or may collect Network Monitor logs that what is the communication and what is the authentication when SharePoint is trying to send emails.

For Telnet test;
1) Start a command prompt with administrator priviledges.
2) type following command:
telnet <Your SMTP server IP> 25
type EHLO

250-SIZE 15360000
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH NTLM ***** Server requires NTLM .
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250 XSHADOW

 

In network trace you can detect as

Frame: Number = 1087, Captured Frame Length = 316, MediaType = ETHERNET
+ Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[00-50-56-B3-16-5A],SourceAddress:[38-22-D6-D4-49-80]
+ Ipv4: Src = 10.10.100.20, Dest = 10.20.100.59, Next Protocol = TCP, Packet ID = 9437, Total IP Length = 302
+ Tcp: Flags=…AP…, SrcPort=SMTP(25), DstPort=46805, PayloadLen=262, Seq=41429760 – 41430022, Ack=1350847993, Win=256 (scale factor 0x8) = 65536
– Smtp: Rsp 250 -<server> Hello [10.20.100.59], 262 bytes
– Response: 250 -<server> Hello [10.20.100.59]
ReplyCode: 250, OK, queuing for node node started, or Requested mail action okay, completed
+ ReplyMessage: -<server>  Hello [10.20.100.59] —-> Sharepoint opens session with 10.20.100.59
ReplyMessage: 250-SIZE
ReplyMessage: 250-PIPELINING
ReplyMessage: 250-DSN
ReplyMessage: 250-ENHANCEDSTATUSCODES
ReplyMessage: 250-STARTTLS
ReplyMessage: 250-X-ANONYMOUSTLS
ReplyMessage: 250-AUTH NTLM —-> Exchange providing NTLM.
     ReplyMessage: 250-X-EXPS GSSAPI NTLM
ReplyMessage: 250-8BITMIME
ReplyMessage: 250-BINARYMIME
ReplyMessage: 250-CHUNKING
ReplyMessage: 250-XEXCH50
ReplyMessage: 250-XRDST
ReplyMessage: 250 XSHADOW

For Resolution:
You can
1) Giving SharePoint Computer account mail submit priviledges
2) Creating a new Recieve Connector on Exchange for SharePoint and provide only anonymous auth.

 

june 2013 CU for sharepoint 2007/2010/2013 has been released

June 2013 CU for SharePoint 2007/2010/2013 has been released.

http://blogs.technet.com/b/stefan_gossner/archive/2013/06/28/june-2013-cu-for-sharepoint-2013-has-been-released.aspx
http://blogs.technet.com/b/stefan_gossner/archive/2013/06/12/june-2013-cu-for-sharepoint-2010-has-been-released.aspx
http://blogs.technet.com/b/stefan_gossner/archive/2013/06/12/june-2013-cu-for-sharepoint-2007-has-been-released.aspx