Monday, November 15, 2010

Increase of Usage Statistics - RackSpace Cloud Sites

I have read this article before but could not find out the reason until today.
http://www.webhostingtalk.com/showthread.php?t=982054

My Boss just asked me to find out the reason for the huge difference between the statistics of the two reports. One from Google Analytics and another from Rackspace Cloud Site - Web Stat 6.

After couple of hours, the cause was successfully identified. RackSpace (Urchin) was counting Search Engine Hits (googlebot, msnbot etc) as a Visits / Views. The actual user visits can be estimated from Web Browser Report / Platform Report.

Wednesday, November 3, 2010

Steps To Install WSP file in STSADM

All the commands for deploying the wsp through stsadm

1. Add the solution
stsadm -o addsolution -filename {WSPFILENAME}
2. Deploy the solution
stsadm -o deploysolution -name {WSPFILENAME} -url {SITEURL}
3. Install the feature
stsadm -o installfeature -filename {FeatureFolder}\feature.xml
4. Activate the feature
stsadm -o activatefeature -id {FEATUREID} -url {SITEURL} -force
5. Deactive the feature
Stsadm.exe -o deactivatefeature -filename “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\ViewFormPagesLockDown\feature.xml” -ur http://servername/
6.Uninstall the feature
stsadm -o uninstallfeature -filename
7.Retract Solution
stsadm -o retractsolution

-name

[-url]

[-allcontenturls]

[-time]

[-immediate]
8.Delete Solution
stsadm -o deletesolution

-name

Reference:
http://littletalk.wordpress.com/2008/12/16/steps-to-install-wsp-file-in-stsadm/

How to Create the Event Handlers

Here is a nice article about how to create Event Handlers.

The event handlers can be attached to Site, List or Contenttype. The advantage with the content type is this that every time you create the instance, the events are automatically activated with new spawn.

Three ways to create Event Handlers.
1. Create it by Code i.e SPEventReceiver
(use Lutz Roders Reflection app for extracting class names)
(3 parameters: SPEventReceiverType, AssemblyName, ClassName)
(Sequence Number: use sequence number after 10,000. SP uses after 1000)
2. Create it by Feature. (wsp file. needs to be activated at every spawn)
3. Through Custom Site Setting - (Developed by : Brian Wilson)
(You can add, delete, edit events on site, list and content type level)

For more Details, visit Brian Wilson - Event Handlers

Monday, November 1, 2010

Sharepoint - Event Handlers

A very nice article by Andreas Finne on "SharePoint Event Handler Gotchas"

http://labs.ecraft.com/Blogs/SharePoint-Event-Handler-Gotchas

Tuesday, September 28, 2010

SQL Server 2005 - Truncate the Log file

USE DatabaseName
GO
DBCC SHRINKFILE(, 1)
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE(, 1)
GO

DBCC SHRINKFILE will shrink the unused space.
BACKUP LOG WITH TRUNCATE_ONLY will take the backup of existing transaction to log and will delete all the previous log.
DBCC SHRINKFILE will shrink the unused space.

Sunday, August 29, 2010

Sharepoint 2007 - Upload Image in list from Computer

The process to attach the images in the list is a long process. first you have to upload the images in the picture gallery and then create the link between them.

After some search, i found this solution which is quite good. though it didn't give you full solution but fare enough.

http://enhancedpicture.codeplex.com/
http://guillermobustamante.blogspot.com/2008/05/my-first-custom-type-well-second.html

* I am still looking for the same solution for the rich text box.
Regards

Monday, August 16, 2010

Sharepoint 2007: How to move content and configuration database

Finally after the lot of googling, i found a simple but effective solution for the migration of SP content and configuration databases.

http://sharepointsherpa.com/2008/04/18/sharepoint-2007-move-content-and-configuration-databases/

Regards

how to find last modified date of table in sql server 2000

As the cluster index gets updated after every entry, DBCC SHOW_STATISTICS will serve our purpose of getting the last modified date in SQL Server 2000.

DBCC SHOW_STATISTICS (TableName, ClusterIndex)

Regards

Sunday, August 15, 2010

Where does a SharePoint server keep note of it's config database?

Right now, I am planning to move my complete farm from SQL Server 2000 SP4 to SQL Server 2005 on different server.

The first thing i came up with is to find the db name (ergh my administrator ... no documentation).

Anyways, i found the solution on http://mindsharpblogs.com/penny/archive/2005/04/03/436.html

Simply check the registry

WSS 2.0 and SPS 2003: HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\Secure\ConfigDb

WSS 3.0 and MOSS 2007: HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb

regards

Tuesday, July 20, 2010

Read CSV Error: Format of the initialization string does not conform to specification starting

I was trying to read the csv into datatable when i encountered this error.
"Format of the initialization string does not conform to specification starting xx"

Some Googling reveal that its a problem of connection string. The connection string i was using is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFolderPath + ";" + "Extended
Properties=’text;HDR=YES;’";

Upon further searching, the particular problem was identified. Basically i was not specifying the CSV Format in the string.

Finally, it is solved by using the following connection string.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFolderPath + ";" + "Extended
Properties=’text;HDR=YES;FMT=CSVDelimited’";

Wednesday, June 30, 2010

Operations could destabilize the runtime

Just now my next seat developer faced this problem.

Exception Details: System.Security.VerificationException: Operation could destabilize the runtime.

The error was in cute editor control.

Few clicks and we found the cause i.e. Elimination of some IL in .net 2.0 from v1.1. Specifically for switch cases

The solution was simple. we just updated cute editor dll to .net 2.0.

Sunday, June 27, 2010

Display " Append Changes to Existing Text " to Custom List Form

It took quite some time but finally i found the solution at Ben's blog.
It was actually very simple. Just remove the

xsl:value-of select="@field_having_append_changes_enable"

to

SharePoint:AppendOnlyHistory runat="server" FieldName="field_having_append_changes_enable" ControlMode="Display"

:-)