Archive

Archive for November, 2006

Feature Deployment Batch Files

November 27th, 2006 No comments

In case you use them on regular basis as I do and until the final version of VS.NET extension is released:


 


Deploy.cmd:
———–
@echo off


SET SPDIR=”C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12″


iisreset /stop


xcopy /d /y /e MOSSDev %SPDIR%TEMPLATEFEATURES


iisreset /start


 


InstallFeature.cmd:
——————-


SET SPDIR=”C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN”


%SPDIR%stsadm -o installfeature -n MOSSDev -force


 



ActivateFeature.cmd:
——————–


SET SPDIR=”C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN”


%SPDIR%stsadm -o activatefeature -n MOSSDev -url http://moss.litwareinc.com



Categories: Uncategorized Tags:

The beauty of using SPWeb in conjunction with the SPSite constructor

November 25th, 2006 No comments

I have been using SPSite and SPWeb classes for a long time to retrieve information from SharePoint. I think for security reason the entry point from outside to a site is ONLY available through the site collection to which that site belongs to. In another word, if you need to retrieve a SPWeb instance for a subsite, you cannot use the following statement:


SPWeb myWeb = new SPWeb (“http://Server_Name/sites/HR/Candidates/default.aspx“);


Instead you should use something like this:


SPSite siteCollection = new SPSite (“http://Server_Name/sites/HR/Candidates/default.aspx“);
SPWeb site = siteCollection.OpenWeb(); <– You will get an SPWeb object representing Candidates subsite


It is nice, isn’t it?


You specify your FULL subsite URL in site collection and you end up getting the SPWeb object representing your subsite in the second line. Yes, SPSite and SPWeb are smart enough to return the lowest-level site specified by the URL that is passed as parameter for the constructor of SPSite. Remember that SPSite still refer to the top-level site which in this case is http://Server_Name/sites/HR.



Categories: Uncategorized Tags:

Watch out: STS site definition in Beta1,Beta2 and B2TR is not a good example for cloning

November 25th, 2006 No comments

The most exciting improvements in WSS V3 is the fact that all site definitions are language neutral (No dependency on an specific language like 1033) and ASP.NET 2.0 localization techniques are all over places in site definition files. I am really surprised that some of folks walk their blog readers through cloning site definitions using STS site definition. STS site definition in all Beta versions IS NOT a good example for reverse engineering, because SharePoint Team is in half way making it language neutral. If you look at folders below:


C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplates


and


C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATE1033


You see that STS site definitions spans into both folders and being in 1033 means that part of this site definition is still based on 1033 and is definitely subject to change in final release.



Categories: Uncategorized Tags:

Visual Studio 2005 Extensions for WSS 3.0 and Custom Master Page Problem

November 20th, 2006 No comments

With the new VSeWSS tools for Visual Studio 2005, SharePoint developers can now create site definitions and deploy them as easy as 1-2-3 to the server without any copy and paste steps involved. Well, it is still in CTP and there are some serious bugs there, so we cannot expect it to work 100%. One thing that is strange is the fact the there is no direct way to have a custom master page in yor project. As soon as you change MasterPageFile=”~masterurl/default.master” to anything else , you will get dozens of errors and warnings and project does not get compiled.

 

If you follow Todd’s solution on how to create ghosted and unghosted master pages , you still have no chance to get this working.I changed Todd’s solution and finally managed to add my own custom.master to the project. here are the steps:

 

1) Add a custom.master to the project (same-level as default.aspx)

 

In ONET.XML

 

2)Add the following tag inside the tag.
3)Scroll down to thesection  and change it to

 

 

 

4) Inside the configuration Tag above , go to thesection

 

and add:

 

 

 

It should look like this after you change it:

 

….

 

 

 

 

 

 

 

 

 

 

 

…..

 

5) Create a new Module section under the tag as shown below:
6) Build and deploy the project , custom.master should show up in the master page gallery of your site and custom.master page is in effect.

 

 

 


Categories: MOSS 2007 Tags:

Full-Text Search in WSS V2 vs WSS V3/MOSS 2007

November 8th, 2006 No comments

Microsoft full-text search is an umbrella technology. Different products (like SharePoint Portal 2003, Exchange and SQL Server) use variants of this technology. Here is a brief look at full text search capability of WSS V2 vs WSS V3/MOSS 2007 and how full text search is done in these three products:


WSS V2 (SharePoint Portal 2003):  You can enable all your content databases to be indexd by SQL Full-Text searh.


1)      Make sure that Full-Text Search subcomponent is installed on your SQL Server 2000 Instance. As I said before, SharePoint relies on SQL Server Full-Text Search capabilities for an efficient retrieval of unstructured, textual data by means of a full-text index.


2)       Make sure that MSSearch service is setup and marked to auto-start and run under the LocalSystem account.


3)       You must upgrade your SQL Server 2000 to use Service Pack 3a


4)       Click Start, point to Administrative Tools, and then click SharePoint Central Administration to connect to Windows SharePoint Service Central Administration. 


5)       In the Component Configuration area, click Configure full-text search. 


6)       Click to select the Enable full-text search and index component check box, and then click OK


WSS V3:  SQL Full text search no longer works with this version .WSS 3.0 search is a subset of MOSS 2007 search with search restricted only to the same site (or if you are in a list to the same site And list).


I) You need to have the WSS Search service started start >>Administrative Tools >> WSS 3.0 Central Administration >>OperationsàServices on Server – by default it is started.


II) When you create web applications you must select a search server.  


III) If you add a content database you must select a search server.


 MOSS 2007: Enterprise search framework in MOSS 2007 has been completely changed and is a “Microsoft Office SharePoint Server 2007 Shared Service”  (Remember, bunch of these expensive services like search will form a SSP or Shared Services Provider). This service supports full-text, keyword searches and IFilter.

Categories: Uncategorized Tags: