Tuesday, April 27, 2010

Working with Data in SharePoint 2010 - Part 1

Hi Folks,

I like to work with data since most of business applications are relying on consuming data from different data sources. This post is to highlight and give you the information or FAQ required to understand how to consume data in sharepoint 2010.

I had a presentation on my previous session on sharepoint saturday was talking about Data manipulation techniques in sharepoint 2010,check this url for details:

1) How can i consume data from sharepoint 2010 ?
You can consume data in sharepoint using different ways: either using the server object model Microsoft.SharePoint.dll in the following path:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI
Or using the Client object model: Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll

Note: if you are developing silverlight application, here is the path for the client object model for silverlight: microsoft.SharePoint.Client.Silverlight.dll and Microsoft.SharePoint.Silverlight.Runtime.dll
Path for the dlls:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin

2) How Sharepoint 2010 is communicating with the client applications:
Clients are communicating in sharepoint 2010 using ADO.Net Data Services ( called also a RESTful API) that reside on the server and accept the requests from the client apps and respond to the requests in JSON objects.

3) What is the benefit of having Rest API ?
Restful API gives you flexible URLs and mutliple representation for the Data returned from the sharepoint server. Restful API is using WCF technology which supports Restful webservices starting from .NET 3.5.

Read more about Restful support in WCF in below link:

4) Which version of VS.NET IDE can i use to develop/consume restful webservices in SharePoint ?
You can use VS 2008 SP1 or VS 2010 and to add a reference to a restful webservice right click on your project and click on "Add Service Reference".

5) Why does Microsoft expose Client object model in SharePoint 2010 ?
Client Object model is a unified method across all client apps to consume sharepoint data: Silverlight Apps, Calling data from JavaScript and from .NET CLR Applications.

6) How can leverage the SharePoint data using LINQ ?
SharePoint 2010 supports LINQ out of the box, what you need to do is to use SPMETAL tool from the command prompt and point it to the required site to create stub from it and use this generated class in your application, then you are ready to use LINQ code from this generated class.

Hope this post helps in understanding working with sharepoint data.

Mostafa arafa

Monday, April 26, 2010

Tips on installing SharePoint 2010 RTM

Hi Folks,

When you try to install sharepoint 2010 RTM version, you might get some error messages while installing the SharePoint and once you have all updates for your windows 2008 SP2 / R2 and SQL 2008 SP1.

Here is some points to put into your consideration:

1) Before start installing SP 2010 by double click on setup.exe try to check your pre-requisites software required on your system.

2) You can install all your pre-requisites from this url:

3) After you download and install all required and start running SP 2010 RTM setup you might get this error message:

Error : This product requires Microsoft filter pack 2.0 sharepoint 2010 RTM

Even if you installed the Filter pack 2.0, you will get this error, to fix it you will find a folder in sharepoint 2010 folder called "PrerequisiteinstallerFiles" -> Filer Pack : inside this folder you will find filter pack 2.0 exe file.

4) Then run the following tool PrerequisiteInstaller.exe in the sharepoint 2010 installation folder and make sure you passed all required software to start installing SP 2010 RTM.

5) Run sharepoint setup file setup.exe.

You will have a successful setup and then you will run Sharepoint configuration wizard to complete the installation.

Hope this helps.

Regards,Mostafa arafa

Tuesday, April 20, 2010

SQL 2008 Troubleshooting Tip : "Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender".

Hi Folks,

I was trying to send Emails using SSIS package deployed in SQL 2008. I was getting this error when i am trying to run the SQL Agent Job which sends Email address on the success of this job.

Error message in event log:
"Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender".

To fix this problem check the following:

1) Check the service account for SQL Agent Service in your server.
2) Make sure the service account is a domain account, because if the system administrator doesn't allow to send emails for anonymous users, then this is one of the main reasons to get this error.
3) Don't forget to restart the SQL service agent if you changed the service account.
4) Inform your system administrator to add anonymous users with a new receive connector in Exchange, check this article:


5) Make sure in your SSIS Package you check use windows authentication checkbox in the SMTP Connection manager.

Hope this helps.

Mostafa arafa

Monday, April 12, 2010

VS 2010 and Silverlight 4 launch

Hi All,

Try to catch the VS 2010 and Silverlight 4 launch on channel 9.

Follow the updates on twitter: @ch9live

To watch the event online: http://www.microsoft.com/visualstudio/en-us/watch-it-live/


Mostafa arafa