Thursday, December 27, 2007

Deploying WebParts in SharePoint 2007

Hi Folks,
Any SharePoint Development requires you to develop your Web Part and deploy it to sharePoint,in this post i will describe the steps required to deploy your web part to sharepoint 2007 site:

1) after creating your web part,you have to sign it with strong name.
To Do that : simply open the project properties and on the signing tab select new and then save the properties ad build your web Library.

2) add to the GAC on your sharePoint Server.
you can do that by using VS.Net Command tools or use .Net 2.0 configuration Tool from the control panel.

NOTE: after you add your DLL to GAC you can find it on C:\Windows\Assembly Folder.

Take Note : you have to store the Publick Key token of the signed DLL by right click on your DLL -> Properties and save the public key token on a notepafe file because it will be used later.

























3) To add this webpart to a sharepoint site,you have to make it "Safe Control " to be loaded and configured on your site.


To Do that : open the web.config file of your site,it resides on C:\IntePub\WWroot\WSS\Virtual Directories


then open the folder of your site,it takes by default the port number of your site.

Paste this code on the web.config : (i removed <> letters of the key)

SafeControl Assembly=”ArafaWebPart,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=2e128026f9c7d6df”
Namespace=”ArafaWebPart” TypeName=”*”

Safe and close your web.config.

4) open your sharepoint site->site settings->web parts->click on new and select your webpart and then click on Populate Gallery.














5) then click on any page and add your web part.













Hope this helps.




Regards,
Moustafa arafa

Monday, December 24, 2007

How to pass DateTime Timestamp to Sharepoint 2007

Hi Folks,

if you developing sharepoint application,you will face that the DateTime timestamp parameter on sharepoint is different than what you are used to pass in your .Net Application.

In SharePoint 2007,the TimeStamp has to passed as a string and this is the format of the string:

"YYYYMMDDTHHMMDDZ"

Take these Notes:

1) Date Part is followed by T Symbol.
2) Time Part is followed by Z Symbol.

and the the rest of the string is easy to get it in your application by using:

C#:
DateTime.Now.Date.ToShortDateString()
DateTime.Now.Date.ToShortTimeString()

By using any string concatenation "+" or use String Builder Class to give better performance.


Hope this helps................


Regards,
Moustafa arafa

Sunday, December 23, 2007

Deploying Features without using stsadmin command line tool

Hi Folks,

i'm using a visual tool which build our command you want to write in the stsadmin command line tool without.

Tool Name : Feature Manager

Download Link :
http://www.sharepointblogs.com/files/folders/tbaginski/entry2449.aspx

One Tip : After install and activate the feature dont forget to reset your IIS.

Don't forget to configure the tool before start by clicking on configuration menu item and put the paths of your installation because its by default its on C:\ Drive.

Hope this helps........

Regards,
Moustafa arafa

0x0020 in MOSS object Model

Hi Folks,

This post to inform that when you develop on sharepoint 2007 object model,and if you are manipulating with lists in sharepoint you might face in the item names or field names you will find that the spaces in sharepoint is converted to this hexidecimal code "0x0020".

Example:
if you have a column name in a list with name "Customer Name",when reading this column in your code you will find the column name is : "Customer_0x0020_Name".

Happy .netting with sharepoint...........

Regards,
Moustafa arafa

Sunday, December 16, 2007

How to enable Search on your MOSS 2007 Site

Hi Folks,

If you want to Enable Search facility on your sharepoint 2007 site,follow these steps:

Go to the Site Settings and under Site Administration Click on Seach Visibility Link.













Update the seetings as shown on the attached image.

even after you enable the search visibility on your site and if you start search for a keyword on your site pages it will not work until the Crawling process will be run.

What's the story of Search Crawling in MOSS 2007 ?

There is a Crawling Service running on all Sharepoint conent pages to index all content,if you start your search for a new added content before the crawling process start by including the new content on its schedule,you will not get your search results.

The Question is : How can i Configure My Crawling process on MOSS 2007 ?

Open your central administration site: click on Share Services link under Share Services Administration.

Click on Search Settings -> Content Sources and Crawl Schedules -> Edit the Content Source which is exist.















Update your crawling services as you want and as per your organization needs.

Hope this helps....


Regards,
Moustafa arafa

Wednesday, December 12, 2007

Variations Tip in MOSS 07

Hi All,

Locatiozation on MOSS 2007 is a piece of cake to start creating your site multi-lingual site.

to start creating multi-language site on sharepoint 2007,you have to use one of the new features on MOSS 2007 called Variations.

when you create variations on your site you might face this problem which mentioned below.

if you got this error message when you try to create heirarchies on your site in sharepoint 2007 :

"No Variation Root Web has been set - hierarchies cannot be created until a Variation Root is set."

simply this because you didn't specify the variation root of your site.

click on variations link and set / on the location to create the variation on your root or base on your select.

hope this helps.

Regards,
Moustafa arafa

Thursday, December 06, 2007

Which Master Page Shall I Use in Built-In Master Pages in MOSS 07 ?

Hi All,

In MOSS 2007,there's 9 Master Pages built-In on any create site in Sharepoint 2007.

The Question is : Which Master Pages shall I use for my Site ?

Case #1: Blue Vertical / Black Vertical
This is the best choice in case you are building an internet sites with good representations of the WCM related columns,No Top Navugation only Left Navigation which is most required on internet sites.

Case #2: Blue Tabs
Is the best alternative for default master page .The difference is the tabbed representations of the top navigation.


Case #3: Blue Band / balck Band / Blue Glass Band
Same as Default master page with both Top and Left navigation,the best selection for starting to customize the default master page.

Orange Sigle Level & Black Single Level : same as blue band master pages with different on Color Combinations.

Or you can still use the default master page with full control on the top and left navigation and customize it but it will take much work on your customizations.

The Good starter from my point for your customization is Blue Band Master page coz it contains the minimal that u want to put on your master page with site actions and navigation.


Hope this Tip help.


Regards,
Moustafa arafa

Wednesday, December 05, 2007

Create your first Content Page in MOSS 2007

Hi Folks,

MOSS 2007 is amazing product from MS,it contains Sharepoint as well as CMS features on one product,Sharepoint 2007 built on top of WSS 3.0 which has alot of features to built collaboration solution with great integraion with asp.net applications.

one of important features on MOSS 2007,the Content management which was separate product before the release MOSS 2007 and had name (CMS 2002 with SP2 latest release).

Now,CMS 2002 is incorporated on MOSS 2007,and the product team for content management on MOSS 2007 has name "ECM" Team : Enterprise Content management which is different than the sharepoint product team.

To start use and implement your first CMS Site on MOSS 2007,its different than CMS 2002,alot of terminologies and key features have been changed.

one of the most required question,HOW TO ? create my CMS or built my Content Site on MOSS with little bit customization.

The Guide URL below,is oyur start,believe me....start forward and showing you step by step how to create your first content page for editors in MOSS 2007.

http://msdn2.microsoft.com/en-us/library/aa830818.aspx

Part 1 is enough for this topic,and to dig more on ECM on MOSS 07,MUST READ 3 PARTS of this Article.

Life is easier with WCM in MOSS 2007.....Thanks Microsoft.

Hope this helps.



Regards,
Moustafa arafa

Tuesday, December 04, 2007

Forms Authentication on MOSS 07 Sites

Great Article shows with screen shots How To ? implement Forms authentication on your MOSS Site.

Excellent Article:

http://weblog.vb-tech.com/nick/archive/2006/06/14/1617.aspx


Another useful one :

http://www.developer.com/net/asp/article.php/10917_3622481_2


Hope this helps.

Regards,
Moustafa arafa

Monday, December 03, 2007

MOSS 2007 Problem : Cannot connect to the configuration database.

Hi Folks,

During my work with MOSS 2007,i had some performance issues regarding the SQL Server instance services which is running the configuration and Data for MOSS sites.

I had closed this service bymistake and when i'm trying to open the central administration site or any site i got this message in the IR:

"Cannot connect to the configuration database."

To resolve this : go to your services and start this service:
"SQL Server (OFFICESERVERS)"

This Tip is enough to continue your work with your MOSS sites.

Hope this helps.

Regards,
Moustafa arafa