Pages

Monday, November 22, 2010

Windows SharePoint Services Timer Service- Unable to start the Timer Service- Showed error -Pathto the executable not found.

There was a problem with Farm Backup and I checked All WSS Services are running or not. “Windows SharePoint Timer Service” was not running , then I start manually and it throws this error.
“Could not start the Windows SharePoint Services Timer Service on Local Computer. Error 3:The System cannot find the path specified”.





Then I checked that “Path to executable” Path was blank. How to set to “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\OWSTIMER.EXE”

We can do the same thing with Registry Edit.
Got to Start -> Run -> type “regedit”, it opens Registry Editor

You can see these screens.
 






    Go to SPTimerV3 and check the “ImagePath” Property value and set with “C:\Program Files\Common    Files\Microsoft Shared\Web Server Extensions\12\BIN\OWSTIMER.EXE”
Now restart the service , it runs!!!
Disha Shah

Backup hangs at [Shared Search Index] 50 percent complete

When I was taking the Farm Backup of SharePoint through the command prompt with this command, “stsadm -o backup -directory <\\server name\folder name> -backupmethod full”
What can be the problems? One of the problems in my case was.
Checked your Windows SharePoint Services all are running or not specially “Windows SharePoint Services Timer Service”, “Windows SharePoint Services Search Service”
In my case there is a problem with “Windows SharePoint Timer Service”, I restarted and I have taken the successfully backup of Entire Farm.

Enjoy!!
Disha Shah

Windows SharePoint Services Timer Status is Stopping

Hello Readers,

I have started to take the backup of SharePoint Farm on one SharePoint server through SharePoint Central Administration.

But it was not giving me any status for starting, Central Admin has given one tips that if it does not automatically start, check Timer Job Definitions or Timer Job Status.

I went to Timer Job Status from SharePoint Central Administration -> Operations->Timer Job Status (Timer Job Status, you will find under “Global Configuration” Sections of “Operations”.

I checked “Application Server Administration Service Timer Job” was initialized but did not success .Then I went to Start->Administrative Tools->Services and I have restarted and it gives me this error .

"Windows SharePoint Services Timer Status is Stopping"


How to solve the problem:
Let us look at the step by step process.
1> End OWSTimer.exe Process from the task manager
      a.       Go to Task Manager and in Process Tab find the OWSTimer.exe, select that process and click button “End Process”.
2>  Click on Windows SharePoint Service Timer, Go to recovery tab, Change Setting of First Failure and Second Failure.
3>  First Failure Change options to Take No Action
4>  Second Failure Change options to Take No Action


5>     Press Ok and Press F5 Refresh Service Page.
6>     Now you can find the “start” option, start it and it is running now.
You have solved the Problem!!!
Enjoy!!
Disha Shah


Sunday, November 21, 2010

Sharepoint 2010 - LIST OF MAPPING OF VIRTUAL FOLDERS WITH PHYSICAL FOLDERSPATH

Hey All

Here you can find a list of Mapping of Virtual Folders With Physical Folder Path in Sharepoint 2010.

LocalDrive:\>iisvdir/query “Sharepoint-80”

No.


Alias


Physical Root

1>/_controltemplatesLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES
2>/_layoutsLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS
3>/_vti_binLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI
4>/_wpresourcesLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources


LocalDrive:\>iisvdir/query “sharepoint Central Administration v3”

No.AliasPhysical Root
1>/_adminLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\ADMIN
2>/_controltemplatesLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES
3>/_layoutsLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS
4>/_vti_admLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ADMISAPI
5>/_vti_binLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI
6>/_wpresourcesLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources


LocalDrive:\>iisvdir/query “Office Server web services”

No.AliasPhysical Root
1>/SharedServices1LocalDrive:\Program Files\Microsoft Office Servers\14.0\WebServices\Shared


LocalDrive:\>iisvdir/query “Sharepoint - 46281”

No.AliasPhysical Root
1>/_controltemplatesLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES
2>/_layoutsLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS
3>/_vti_binLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI
4>/_wpresourcesLocalDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources


So Find out files!!!
Disha Shah

Thursday, November 18, 2010

Make Sharepoint Sites for ReadOnly Access during maintance mode

Hello Friends
We have requirement in which we need to make all SharePoint sites on maintained mode and do now allow users to modify anything.
They should go through pages but they should not add or modify any content on SharePoint sites.
How we can do that?
As we know command line tool of SharePoint STSADM is very powerful, we can use one of operation of Stsadm that is Setsitelock
Make one batch file and repeat the same coomand for all sharepoint sites which should go to the readonly access
stsadm -o setsitelock -url http://SharepointSiteURL -lock Readonly
For more information for setsitelock, refer this link.
http://technet.microsoft.com/en-us/library/cc262811(office.12).aspx
Hope this helps!!!
Disha Shah

Sharepoint_Config Suspect Mode

Hello Friends
Just Browse to SharePoint Site and got the error which is a general issue "Cannot Connect to the configuration database"
I have looked into all common resolutions, Checked all services are running or not, especially SQL Server and yes it is running.
Then I just logged in into the "SQL Server management Studio" and check databases where all are functioning normally or not.
I saw "Sharepoint_Config(suspect)." I scared but there is a very simple solution available for that .Just run this to recover the database may be you lose your some of data but it will recover and run your SharePoint successfully.
EXEC ALTER DATABASE yourSharepoint ConfigDBname SET EMERGENCY
DBCC checkdb('yourSharepoint ConfigDBname')

ALTER DATABASE yourSharepoint ConfigDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('yourSharepoint ConfigDBname', REPAIR_ALLOW_DATA_LOSS)

ALTER DATABASE yourSharepoint ConfigDBname SET MULTI_USER sp_resetstatus 'yourSharepoint ConfigDBname';

Hope this scripts helps some one's life!!

Enjoy
Disha Shah

Friday, November 12, 2010

Wednesday, November 3, 2010

PowerShell Command Editor

Where we can write PowerShell Commands?
If SharePoint Server is running we can write PowerShell Commands with the two ways
1> Start Menu --> SharePoint 2010 Management Shell
2> From command prompt write: PowerShell

We can check the list of installed snap-ins by using this command:
Get-PSSnapIn
 Disha Shah

PowerShell OverView and Examples with SharePoint 2010

OverView:
PowerShell is a command line scripting tool which introduces the concept of a cmdlet, those commands that are derived from the System.Management.Automation .Cmdlet class and are created using the .NET Framework.
For Example,
(Get-SPWeb -Identity http://localhost).Title
or
$RootSite=Get-SPWeb -Identity http://localhost
$ RootSite.Title
Examples:
  • Setting Properties on SharePoint Objects
           $ RootSite =SP-GetSPWeb -Identity http://siteurl
           $ RootSite.Title="My First Site"
           $ RootSite.Update()
  • Connecting to SharePoint Remotely
          Powershell is very powerful; with the powershell we can connect with remote machine and  open a PowerShell session on a client machine.
         To enable remoting on the server, enter the following command:
         Command: Enable-PSRemoting
         To connect to any machine by entering the following command:
         Command: Enter-PSSession "Server Name" -Credential (Get-Credential)
         Once a remote connection has been established, the SharePoint snap-in can be added with the  command:
         Command: Add-PSSnapin Microsoft.SharePoint.PowerShell
  • Working with Timer Jobs
             Get-SPTimerJob | Select -Expand HistoryEntries | Where {$_.Status -ne "Succeeded"} |
             group JobDefinitionTitle
Like these , We can do so many operations by running different commands of PowerShell like “Create/Delete  Site Collections and Site”, ”Properties on Sharepoint Objects”,”Lists and Libraries” etc.
Disha Shah

Error Handling in Sharepoint 2010 via Programming (Object Model)

SharePoint exceptions are derived from the SPException class.


Below code gives you example for write error logging details to the SharePoint Unified Logging Service (ULS) logs.


void ErrorEntry()
{

        try
        {
             //Development code

        }
       catch (Exception ex)
       {
             SPDiagnosticsCategory diagnosticsCat = new SPDiagnosticsCategory("categoryName" ,  TraceSeverity.Monitorable , EventSeverity.Error);

SPDiagnosticsService.Local.WriteEvent(1 , diagnosticsCat , EventSeverity.Error , "Error Message" , ex.StackTrace);

       }
}

Disha Shah

INFOPATH 2007 TRUST LEVEL

When I deployed InfoPath form to another environment, I found it misbehaved something because of trust level problems.

So let us talk about Trust Levels related to InfoPath form and how we can modify?
Trust Levels


Normally InfoPath 2007 decides automatically pick up security level which needed to an InfoPath form.


A security level determines which features are available to the InfoPath form.
  • Full trust security level
  • Domain security level
  • Restricted security level
How to change Trust Level depends on Requirement?

At design time, InfoPath 2007 will automatically choose the security level which provides the minimum amount of permissions that are required to perform the form successfully. To change different security level we have to perform some operations manually.


You can do this by setting the security level and signing the form template with a certificate in InfoPath Tools -> FormOptions.

This opens the Form Options window, where you can select the Security and Trust category. You can also specify a digital certificate that you want to use to sign the formtemplate.




























More Inforamtion For InfoPath Forms are located here. please refer to the following location:

Disha Shah

Overview and Difference between Sandboxed solution and Farm solution For SharePoint Project Type in Visual Studio 2010

In SharePoint 2010, we can create two types of solution
1>     Sandboxed Solution
2>     Farm Solution.
So what is difference between these two solutions?
Sandboxed solutions: Run in a secure, monitored process. Sandboxed solutions can be deployed without requiring SharePoint administrative privileges. If you choose a sandboxed solution, you can only use project item types that are valid in sandboxed solutions.
Farm solution:  In this solution all SharePoint project item types in are available, but deployment needs administrative privileges and the solution must run in FULL TRUST permission LEVEL.
Which solution needs to select?
Sandbox solution is best because of following reasons.
·         It will deployed at the site collection level rather than the farm level, so it allows us to this lets you separate a solution so it is only offered to one site collection within the farm.
·         Sandboxed solutions also run in a separate process from the main SharePoint IIS web application process, and the separate process is throttled and monitored with quotas to guard the SharePoint site from becoming unresponsive due to a misbehaving sandboxed solution.
·         Users can deploy solutions not including requiring administrator agreement

Many useful features provide by Sandboxed solution then why we need Farm Solution?
If Code requirements to run at the Web Application of Farm Level or talk with multiple site collection, in that case we should  go for Farm Solution

Disha Shah

Tuesday, November 2, 2010

How to Hide ItemToolbar in SharePoint 2007?

Hello


We have business requirement which indicates that User should not see entire toolbar when they view any item, how to disable that?
Simple Approach with JavaScript inside the ContentEditor Webpart

<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("hideFields");
function hideFields() {
   var control = document.getElementById('controlID');
    control.style.display="none";
}
</script>

NOTE: you can find the control ID by downloading Internet Development toolbar and just select that element it will show that control ID.

Disha Shah

Alert Box in Sharepoint Pages

Hello Friends

Sometimes we need to provide users some messages or warning alert box when they save or delete data.

How to do that? Very Simple, No need for coding!!

We need to add a simple JavaScript code  in content editor webpart on a particular page where we need to popup that alert box.

Here is a sample of code

<script language="JavaScript">
function PreSaveAction()
{
alert('Your Information has been successfully saved');
return true;
}

Disha Shah