Tuesday, August 04, 2009

Service Pack 2 Update.
The public update for the Service Pack 2 expiration date issue is now available for download.
The update can be applied before or after Service Pack 2 installation. If the update is applied prior to installing Service Pack 2 it will prevent the expiration date from being improperly activated during installation of Service Pack 2, if it is applied after Service Pack 2 it will remove the expiration date incorrectly set during installation of Service Pack 2.
The update is applicable to all of the products that this issue affected (see the list in the KB linked below).
Installation instructions and download links for x86 and x64 are available in this KB: http://support.microsoft.com/kb/971620
The direct download link for x86 is: http://download.microsoft.com/download/2/F/5/2F51AB71-1325-49D2-9CB9-18DEC4780E99/office2007-kb971620-fullfile-x86-glb.exe
And for x64: http://download.microsoft.com/download/5/B/B/5BBD34A9-C528-42B0-8A5F-9A8997B25C32/office2007-kb971620-fullfile-x64-glb.exe

Reset Password for SharePoint Farm Service accounts

Sample Batchfile to reset password for various Service accounts used in SharePoint environment :

Use the following syntax to run the script:
FileName.bat DomainName\UserName NewPassword

@echo off
rem other app pools
echo *** Updating app pool passwords
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o updateaccountpassword -userlogin %1 -password %2 -noadmin
rem central admin
echo *** Updating Central Admin password
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o updatefarmcredentials -userlogin %1 -password %2
rem ssp - new
echo *** Updating ssp password for new installs
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o editssp -title "SharedServices1" -ssplogin %1 -ssppassword %2
rem ssp - upgrade
echo *** Updating ssp password for upgraded installs
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o editssp -title "Default Web Site" -ssplogin %1 -ssppassword %2
rem osearch
echo *** Updating osearch password
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o osearch -farmserviceaccount %1 -farmservicepassword %2
echo *** MANUAL UPDATE NEEDED. To update the password, visit the SSP Web application page, click Search Settings, and then click Default Content Access Account.
rem spsearch
echo *** Updating spsearch password
"%commonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN\Stsadm.exe" -o spsearch -farmserviceaccount %1 -farmservicepassword %2
echo *** Updating spsearch content access account
"%commonprogramfiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o spsearch -farmcontentaccessaccount %1 -farmcontentaccesspassword %2
rem restarting IIS
echo *** Doing soft restart of IIS
iisreset /noforce
echo on

Friday, May 29, 2009

Report Viewer Web parts for SharePoint
Two types of Report Viewer Web parts are available :
1. Web Parts which come with SQL Server Reporting Services
2. Web Parts which come with the Reporting Services Add-in for Sharepoint
Though both web parts have same name the difference between them is that the web parts which come with the add-in will work only with Reporting Services in SharePoint Integrated Mode.
The web parts which come with SQL Server Reporting Services work with Reporting Services in native mode.

The SSRS web parts can be found on the server where Reporting Services is installed. The default location is “C:\Program Files\Microsoft SQL Server\90\Tools\Reporting Services\SharePoint\RSWebParts.cab”. To install these web parts, copy the RSWebParts.cab file on the SharePoint Server and run the following command at the command prompt.
“STSADM.EXE -o addwppack -filename "RSWebParts.cab" -globalinstall

Wednesday, May 27, 2009

System requirements for SharePoint Server 2010:

  • SharePoint Server 2010 will be 64-bit only
  • SharePoint Server 2010 will require 64-bit Windows Server 2008 or 64-bit Windows Server 2008 R2
  • SharePoint Server 2010 will require 64-bit SQL Server 2008 or 64-bit SQL Server 2005.

So, what can you do today to get into the best shape for SharePoint Server 2010?

  1. Deploying 64-bit is our current best practice recommendation for SharePoint 2007.
  2. Deploy Service Pack 2 and check SharePoint 2010 Upgrade Checker that’s shipped as part of the update. The Upgrade Checker will scan your SharePoint Server 2007 deployment for many issues that could affect a future upgrade to SharePoint 2010.


Locking down SharePoint Application pages

SharePoint 2007 application pages (_layouts) can be locked down to prevent users from accessing them. This is helpful not only in preventing users from accessing application pages they don’t need to be accessing on a public facing web site, but also in preventing search engines from crawling application pages.

To lock down your SharePoint 2007 application pages, use the STSADM command:

stsadm -o activatefeature -url -filename ViewFormPagesLockDown\feature.xml

This can be unlocked using :

stsadm -o deactivatefeature -url -filename ViewFormPagesLockDown\feature.xml

Note: By default, this SharePoint 2007 feature is deactivated, unless the site was created using the “Publishing Site” template

How to become a MVP

To become an MVP you should do following regularly

  • Active Participation in Communities
  • Writing Technical Articles
  • Participation in Technical Groups
  • White Papers
  • Speaker in Conferences
  • Speaker in Webinars

Free SharePoint webparts

Check the list available at Mark Kruger Blog :
http://www.sharepointblogs.com/mkruger/archive/2007/06/26/free-sharepoint-web-parts-3rd-party.aspx

Saturday, May 23, 2009

Important announcement on SharePoint Service pack 2
There is a bug in SP2, which Microsoft is currently working on and will soon release a hot fix. During the installation of SP2, a product expiration date is improperly activated. This means SharePoint will expire as though it was a trial installation 180 days after SP2 is deployed. Also, while installing the SP2 on WSS 3.0, you may get the following error : "The detection failed, this can be due to a corrupted installation database". Please read through the Microsoft SharePoint blog for more details.

Tuesday, May 19, 2009

SharePoint - Browser support

FeatureFirefox 1.5Mozilla 1.7Netscape Navigator 7.2Netscape Navigator 8.1Safari 2.0
Connect to Outlook/ClientY (1)Y (1)Y (1)Y 1)Y (1)
Context menuYYYYY
Drag and Drop (of Web Parts)Y (2)Y (2)Y (2)Y (2)Y (2)
Edit in Datasheet viewNNNNN
Edit In (Microsoft Office application)NNNNN
Explorer viewNNNNN
List attachmentsYYYYN (3)
Multiple file uploadNNNNN
New DocumentY (4)Y (4)Y (4)Y (4)Y (4)
Part to Part ConnectionsNNNNN
People PickerY (5)Y (5)Y (5)Y (5)Y (5)
Rich text ToolbarN (6)N (6)N (6)N (6)N (6)
Send ToY (7)Y (7)Y (7)Y (7)Y (7)
Web DiscussionsNNNNN
Web Part menuY (8)Y (8)Y (8)Y (8)Y (8)
Export to SpreadsheetY (9)Y (9)Y (9)Y (9)Y (9)
Date Picker ControlN(10)N(10)N(10)N(10)N(10)
Summary Links Web PartYYYYY (11)
Excel Calculation ServicesYYYYN
Slide LibraryNNNNN
Excel Web AccessY(12)NY(12)Y(13)N
Open in ExcelNNNNN
Open SnapshotNNNNN
Sorting and Filtering (Excel Services)NNNNN
Signing forms (Forms Server)Y (14)Y (14)Y (14)Y (14)Y (14)
Rich Text (InfoPath)N (15)N (15)N (15)N (15)N (15)
Rich text editing in Forms Server ormsNNNNN

Table Key:


Y - Compatible. All or most aspects of the user experience are equivalent. See Numbered Notes for any differences in user experience.


N - Not compatible. Item either is not available from the menu or will not function. Unless otherwise noted, this feature requires ActiveX controls, which run only in Internet Explorer.


Numbered Notes:


(1) These browsers will use the Connect to Client menu item on the Actions menu. This will open a client application that is registered to handle the stssync:// protocol, such as Microsoft Outlook.


(2) Web Parts cannot be placed by using drag and drop. You must click edit on the Web Part, select Modify Web Part, and select the zone from the Layout section of the Web Part properties page.


(3) This functionality is not supported because of an issue with the browser.


(4) Although the New button will not work, you can use the Upload Document button.


(5) Does not convert DOMAIN\Username to display name. If the name is not recognized, an error will be displayed.


(6) The toolbar will not be displayed; however, you can use HTML tags to display styled text. A link to a Help topic that describes the HTML tags supported will be provided under the rich-text field.


(7) With these browsers, and with Internet Explorer without the Microsoft Office client application installed, files cannot be sent from one farm to another farm. For files sent from a server to another server in the same farm, ASPX pages will be used instead of Windows dialog boxes.


(8) The drop-down list menu (triangle on the side of the control) has a different user experience, but the functionality is similar.


(9) This feature might work properly in these browsers. It downloads a file that has the .iqy extension to the browser. If Microsoft Office Excel is not installed, and no other application is configured to open this file, this feature will not work.


(10) Users can still enter dates into the date fields.


(11) When you click for a new link, the pop-up dialog box is the wrong size and the OK and Cancel buttons are partially obscured.


(12) You cannot sort or filter Pivot Tables. There is no work around for this.


(13) The Navigator 8.1 browser must be configured to render in Internet Explorer mode. For more information about switching modes, see the browser documentation.


(14) You cannot sign documents, but you can view signatures.


(15) The rich text is read-only by default. If you try to edit the text, all rich-text formatting is lost

Thursday, April 16, 2009

Service Pack 2 for WSS and MOSS

Microsoft has announced release of this service pack, and it will be available on 28th Apr 2009. Windows SharePoint Services 3.0 SP2 and Microsoft Office SharePoint Server SP2 include fixes and enhancements designed to improve performance, availability, and stability in your server farms. SP2 provides the groundwork for future major releases of SharePoint Products and Technologies.
· An STSADM command line that scans your server farm to establish whether it is ready for upgrade to the next version of SharePoint and provides feedback and best practice recommendations on your current environment.
· SP2 offers support for standards-based documents formats and compatibility with a broader range of Web browsers.
· Substantial improvements to Forms-based authentication.
· Windows Server 2008 SP2 and Windows Server R2 will be supported on their release.

Enterprise Content Management (ECM)
· The performance and stability of content deployment and variations feature has been improved.
· A new tool has been added to the STSADM command-line utility that enables a SharePoint administrator to scan sites that use the variations feature for errors.
Excel Services
· SP2 makes it easier to configure Excel Web Access Web Parts on new sites.
· Several rendering, calculation, and security issues have been resolved.
· Some display issues have been addressed.
· Improved compatibility with Mozilla Firefox browsers.

Tuesday, February 24, 2009

How to Create site programmatically

Code :

using(SPSite oSiteCollection = new SPSite("http://"Server_Name")){

SPContext.Current.Web.AllowUnsafeUpdates = true;

SPWebCollection objWebs = oSiteCollection .Webs;

objWebs.Add("strUrl", "strTitle", "strDescription", 1033,"STS#0", true, false);

SPContext.Current.Web.AllowUnsafeUpdates = false;

}

There are three overload for creating site. First overload simply give the name of the site that you want to create which does not give us much flexibility.Rest two overloaded method has only one difference. Difference is of specifying the site template. you want to use team site, blank site, wiki, blog. What kind of a site you want to create goes here.

Parameters used in the above code :


strWebUrl :A string that contains the new Web site URL relative to the root Web site in the site collection. For example, to create a Web site at http://MyServer/sites/MySiteCollection/MyNewWebsite, specify MyNewWebsite, or to create a Web site one level lower at http://MyServer/sites/MySiteCollection/Website/MyNewWebsite, specify Website/MyNewWebsite.
strTitle : A string that contains the title.
strDescription : A string that contains the description.
nLCID : A 32-bit unsigned integer that specifies the locale ID.
strWebTemplate :A string that contains the name of the site definition configuration or site template. The following table shows the values for the default site definition configurations that are included in an installation of Windows SharePoint Services.
STS#0 -Team Site
STS#1 -Blank Site
STS#2 -Document Workspace
MPS#0 -Basic Meeting Workspace
MPS#1 -Blank Meeting Workspace
MPS#2 -Decision Meeting Workspace
MPS#3 -Social Meeting Workspace
MPS#4 -Multipage Meeting Workspace
WIKI#0 -Wiki
BLOG#0 -Blog
By default, a global site template (GLOBAL#0) is added to all site definitions. You cannot explicitly create a site based on a global site template.
useUniquePermissions : true to create a subsite that does not inherit permissions from another site; otherwise, false .
bConvertIfThere : true to convert an existing folder of the same name to a SharePoint site. false to throw an exception that indicates that a URL path with the specified site name already exists.
[Return ValueAn SPWEB object that represents the new Web site.]

Don't want to create new version or want to edit fields like Author, Modified, etc
When you have versioning enabled on document library or list and when you do not want to create a new version even you are updating an item in the list or document library at that time you can use this method because Update will create version for the item.

Many times i also found that in workflow when you want to update any item on which workflow is running and if you use Update method on the SPListItem, it throws Error in terms on Error Starting in Workflow. When i use this UpdateOverwriteVersion, it didn't give me.

With the help of this method, you can also set certain properties like Author, Editor and Modified. Remember you need to change both Author as well as Editor on these properties to take effect.

Example :

using (SPSite objSite = new SPSite("http://server/"))
{
using (SPWeb objWeb = objSite.OpenWeb())
{
SPList objDocLib = objWeb.Lists["Shared Documents"];
SPListItem objItem = objDocLib.Items[0];
objItem ["Created"] = new DateTime(2008, 5, 5);
objItem ["Author"] = "{author}";
objItem ["Editor"] = "{editor}";
objItem ["Modified"] = new DateTime(2008, 5, 6);
objItem.UpdateOverwriteVersion();
}
}
How to Hide fields in Newform.aspx/editform.aspx

Suppose you don't want to show a column/field in Newform.aspx or Editform.aspx for a list. There are couple of way to hide a column from Newform.aspx/Editform.aspx. I have used the javascript in Content Editor webpart to hide the column in Newform.aspx. I open the Newform.aspx in the browser. By default the "Editpage" option for this page will be disabled. To the URL of the page add "&Toolpaneview=2". You will be able to edit the page. Click on "Add a new webpart" and select "Content Editor Webpart". In the "source view" add the following code :

//
script language="javascript" type="text/javascript">_spBodyOnLoadFunctionNames.push("hideFields");
function hideFields() {var control = getTagFromIdentifierAndTitle("Input","TextField","Misc");control.parentNode.parentNode.parentNode.style.display="none";}
function getTagFromIdentifierAndTitle(tagName, identifier, title) {
var len = identifier.length;var tags = document.getElementsByTagName(tagName);
for (var i=0; i < tags.length; i++) {var tempString = tags[i].id;if (tags[i].title == title && (identifier == "" tempString.indexOf(identifier) == tempString.length - len)) {return tags[i];}}return null;}
//
//
The Above code assumes that you have a Textfield named "Misc".


Tuesday, January 20, 2009

SharePoint internet version licencing

You cannot have both Internet version and Standard/enterprise version of MOSS 2007 on the same farm. There is no limitation from the product side, but more from the licencing policy. If you wish to have both Internet and Intranet access in the same Farm, then you need to buy two licences(Internet and Standard/enterprise) of MOSS 2007 for your Index server. Also, remember that you need to buy Windows Internet connector licence for each of the Windows 2003 server exposed to internet(which will host annonymous content).