Stop SharePoint Completely or stopping the farm

For Wss 3.0:

Stop the farm by following these steps:

1. in the Services snap-in, stop the following services:

  • Windows SharePoint Services Administration service
  • Windows SharePoint Services Search service
  • Windows SharePoint Services Timer service
  • Windows SharePoint Services Tracing service
  • Windows SharePoint Services VSS Writer service

2.    at the command prompt, type iisreset /stop.

Do it for all SharePoint installed servers in your farm.
http://technet.microsoft.com/en-us/library/cc512723(v=office.12).aspx

For Moss 2007

Stop the farm by following these steps:

1.  in the Services snap-in, stop the following services:

  • Microsoft Single Sign-On service
  • Office Document Conversions Launcher service
  • Office Document Conversions Load Balancer service
  • Office SharePoint Server Search service
  • Windows SharePoint Services Administration service
  • Windows SharePoint Services Search service
  • Windows SharePoint Services Timer service
  • Windows SharePoint Services Tracing service
  • Windows SharePoint Services VSS Writer service

2. On the server that is running the Central Administration Web site, at the command prompt, type iisreset /stop.
Do it for all SharePoint installed servers in your farm.
http://technet.microsoft.com/en-us/library/cc512725(v=office.12).aspx

For SharePoint Foundation 2010

1. in the Services snap-in, stop the following services:

  • SharePoint 2010 Administration
  • SharePoint 2010 Timer
  • SharePoint 2010 Tracing
  • SharePoint 2010 User Code Host
  • SharePoint 2010 VSS Writer
  • SharePoint Foundation Search V4
  • SharePoint Server Search v4
  • World Wide Web Publishing Service

2. at the command prompt, type iisreset /stop.
Do it for all SharePoint installed servers in your farm.
http://technet.microsoft.com/en-us/library/cc512723(v=office.14).aspx

For SharePoint Server 2010

1.  in the Services snap-in, stop the following services:

  • SharePoint 2010 Administration
  • SharePoint 2010 Timer
  • SharePoint 2010 Tracing
  • SharePoint 2010 User Code Host
  • SharePoint 2010 VSS Writer
  • SharePoint Foundation Search V4
  • World Wide Web Publishing Service
  • SharePoint Server Search 14
  • Web Analytics Data Processing Service
  • Web Analytics Web Service

Not:  The final two services are part of the Web Analytics service application. If you are running the Web Analytics service application and choose to rename your server, you must also reconfigure the Web Analytics database locations. For details, see To reconfigure Web Analytics database locations .

2. On the server at the command prompt, type iisreset /stop.
Do it for all SharePoint installed servers in your farm.
http://technet.microsoft.com/en-us/library/cc512725(v=office.14).aspx

For SharePoint 2013

1. in the Services snap-in, stop the following services:

  • SharePoint 2013 Administration
  • SharePoint 2013 Timer
  • SharePoint 2013 Tracing
  • SharePoint 2013 User Code Host
  • SharePoint 2013 VSS Writer
  • World Wide Web Publishing Service
  • SharePoint Server Search

2. On the server that is running the SharePoint Central Administration website, at a command prompt, type iisreset /stop.
Do it for all SharePoint installed servers in your farm
http://technet.microsoft.com/en-us/library/cc512725(v=office.15).aspx

Advertisement

SharePoint Word Count with Rich Text Editor

This could only be achieved via custom development and is not possible by using SharePoint’s out
of the box features or setup options  this following blog where a word count is achieved with JavaScript:
https://www.nothingbutsharepoint.com/sites/eusp/Pages/add-character-or-word-count-to-sharepoint-multi-line-plain-text-field-and-restrict-input-length.aspx

But there is also an exception , it is only working for a Input element.

Rich Text Box are different than normal text box

<TD vAlign=top width=190 noWrap>
<H3><NOBR>RichText</NOBR> </H3></TD>
<TD vAlign=top RteRedirect=”[Control Chain]_TextField_inplacerte”><!– FieldName=”RichText”
FieldInternalName=”RichText”
FieldType=”SPFieldNote”
–><SPAN>
<DIV>
<DIV style=”DISPLAY: none” id=[Control Chain]_TextField_inplacerte_label>Rich text editor</DIV>
<DIV aria-haspopup=true style=”MIN-HEIGHT: 84px” id=[Control Chain]_TextField_inplacerte role=textbox aria-labelledby=[Control Chain]_TextField_inplacerte_label contentEditable=true InputFieldId=”[Control Chain]_TextField_spSave” UseInlineStyle=”True” aria-autocomplete=”both” aria-multiline=”true”>
<P>​</P></DIV>
<DIV style=”CLEAR: both”></DIV></DIV>
<SPAN dir=ltr><INPUT id= [Control Chain]_TextField_spSave name=[Control Chain]TextField_spSave type=hidden> </SPAN></SPAN></TD>

Text Area :
<TR><TD vAlign=top width=190 noWrap>
<H3><NOBR>RichText</NOBR> </H3></TD>
<TD vAlign=top><!– FieldName=”RichText”
FieldInternalName=”RichText”
FieldType=”SPFieldNote”
<SPAN><TEXTAREA id=”[Control_Chain]_TextField title=RichText cols=20 rows=6 name=””></TEXTAREA>
<BR></SPAN></TD></TR>

SharePoint 2010 has using also div based RTE so javascript codes based on above artilce can be adjust like that;

<script src="<your jquery path and version>/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$('div[role*="textbox"]').bind('keyup blur',function(e){
 var thisLength = $(this).text().length;
if(true && thisLength>0){
thisLength = $(this).text().split(/[' '|\n]/).length;
}

if(true && 200>0){

if(thisLength>(200-5)){
$("#myCustomCounter_").css({'background-color':'#FF0000','font-weight':'bold','color':'white'});
}else if(thisLength>(200-10)){
$("#myCustomCounter_").css({'background-color':'#FF6600','font-weight':'bold','color':'white'});
}else{
$("#myCustomCounter_").css({'background-color':'transparent','font-weight':'normal','color':'black'});
}

}

if(200>0){
if(true){
while(thisLength>200){
currVal = $(this).text();
$(this).val(currVal.substring(0,currVal.lastIndexOf(' ')));
thisLength--;
}
}else{
if(thisLength>200){
currVal = $(this).text();
$(this).val(currVal.substring(0,200));
}
}
thisLength = (200-thisLength<0)?0:200-thisLength;
}

$("#myCustomCounter_").html("Remaining words asda: "+thisLength);
}).parents('td:first').append("<span id='myCustomCounter_' style='padding:2;'></span>").find('input[name*="TextField_spSave"]');

​</script>

Prevent caching for specific files in SharePoint

Assume following scenario that you have a SharePoint environment and all cachings are enabled . Caching is very efficent for documents which are not change frequently . What if you have dynamically and frequently changing xml,js,txt or a css file . so how could you provide to bypass only needed files are not being cached and other leave other same type files be cached.

There is an ASP.NET trick for this purpose. Assume that we have a menu.xml and this file is updating by some Operations on server and this operation happens very frequently. But your clients could not get updated file until they completely clear their browser caches. You dont want to be prevent every xml files to be not cached .
Basically caching machanizms has deciding to cache files by checking url syntax. If you have change the url somehow you can prevent the cache. We usually provide this by adding a fake version query string like menu.xml?ver=1 at the end of the url . and increasing this parameter when ever we changed the file. For some examples you can aslo use GUIDs for this.

1)Create a test.js file and type following codes. You may also integrate this to your own page directly.

function CreateDigits() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }
function createGuid() {     return (CreateDigits() + CreateDigits() + “-” + CreateDigits() + “-4” + CreateDigits().substr(0, 3) + “-” + CreateDigits() + “-” + CreateDigits() + CreateDigits() + CreateDigits()).toLowerCase(); } //alert(createGuid());

$.get(‘/_layouts/menuxml/menu.xml’ + ‘?ver=’ + createGuid() , function (data) {     //do operations.     alert(‘Load was performed.’); });

2) Add test.js to your masterpage
<script type=”text/javescript” src=”/_layouts/test.js” ></script>

3) Use IE developer Panel (F12) or  Firefox Firebug plugin or Fiddler2 program on your client  check that menu2.xml is loading when you request the file.

You should see the menu.xml file request has contain ?ver=<GUID> notation.

4) Update your Javascript files where loading  XML file according to example.

5) And test the change xml file and check still browsers caching the file

What we basically do ?

Following codes has creates a GUID function CreateDigits() While we requesting the xml file we adding end of the url of the file this GUID as a parameter for every request it will creates another guid. Like http://<site>/_layouts/menuxml/menu.xml?ver=bca7f319-5627-4d22-48f6-4c3e59285199

So it will provide that every request on client is unique and force the clients update XML file for every time. This is the basic logic you can develop yours based on this.

Resources:
http://guid.us/GUID/JavaScript