Archive for July, 2008

Issue or Bug in Explorer View?

Is basic test case missed? The explorer view is not updated even after refreshing the page when we delete the documents from the document library in “All documents” view.
Issue repro steps:
1)Create a document library “MyDocs1” and upload the documents
2) Now change the view from “All Documents” to “Explorer View”, it correctly displays all the documents [...]


Sharepoint Object Model Best Practices

Follow the below best practices while doing custom coding using sharepoint object model. I found these articles very useful.
1) Best Practices: Common Coding Issues When Using the SharePoint Object Model
http://msdn.microsoft.com/en-us/library/bb687949.aspx
2) Best Practices: Using Disposable Windows SharePoint Services Objects
http://msdn2.microsoft.com/en-us/library/ms473633.aspx


How to activate or deactivate feature using sharepoint object model

To activate feature through Sharepoint object model use the following code
Activate a feature:
spSite.Features.Add(“featureId”)
Deactivate a feature:
spSite.Features.Remove(“featureId”)


How to Log errors to SharePoint Log file

In SharePoint log files are available under \Common Files\Microsoft Shared\web server extensions\12\LOG.

Exceptions can be logged to the default SharePoint log file using the following line of code.
Microsoft.Office.Server.Diagnostics.PortalLog.LogString(”Exception Occurred: {0} || {1}”, Ex.Message, Ex.StackTrace);

Note: Make sure that you add the reference to Microsfot.Office.Server dll


How get the process ID of a SharePoint application if multiple web Applications are running

You can run IISAPP utility from the command prompt which will list  all the w3wp processes, their Application Pool Id and process ID.

This is helpful when you want to attach w3wp process to a debugger ,and when multiple web Applications are running.


Microsoft Office SharePoint Server 2007 Trial Version

Here is the link to download the Trial version of Standard and Enterprise editions of Microsoft Sharepoint Server 2007.
Download


Welcome to MOSSGEEK

Welcome to mossgeek , a blog for share point professionals.