Wednesday, December 5, 2012

Get-SPDatabase – How to see the SharePoint content DB size

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))}

image
Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}}

Get-SPContentDB

Friday, November 2, 2012

User Information List– the hidden list in SharePoint


User info list can be accessed using following URLs. This is a hidden list there is no out of the box option to edit or delete the users from here. Initially I thought it requires custom solution to delete the users from here.

Simple view : ../_catalogs/users/simple.aspx
Detail view: ../_catalogs/users/detail.aspx

However if you delete the user from ‘People and Groups’ (All people view) using the following URL user info list also reflects it :-)

_layouts/people.aspx?MembershipGroupId=0&FilterField1=ContentType&FilterValue1=Person

Thursday, August 9, 2012

SharePoint 2013 Free Training videos from Microsoft !!

Developer-focused training, walkthrough videos, if anyone is interested.

http://msdn.microsoft.com/en-us/office/apps/fp123626.aspx

You may also set up Development environment using Office 365 Developer Site on Cloud and start developing ‘SharePoint 2013 Apps’.

Also http://msdn.microsoft.com/en-us/library/jj163980(v=office.15).aspx

Happy learning SharePoint :-)

Wednesday, July 11, 2012

Cannot start service SPUserCodeV4 on computer – Sandboxed solution

You might get this error while deploying a sand boxed solution

Error    1    Error occurred in deployment step 'Activate Features': Cannot start service SPUserCodeV4 on computer 'XXXXXXXX'.

The above error can be resolved by starting the service below in Central Admin >> System Setting >>Manage services on server

Microsoft SharePoint Foundation Sandboxed Code Service

Friday, July 6, 2012

PowerGUI Error : Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime

When you are working with Power GUI script editor version 3.2.0.2237 and installed Visual Studio 2010 on the same machine, you will the following error- 

“Microsoft SharePoint is not supported with version 4.0.30319.261 of the Microsoft .Net Runtime.”

To fix this, open “ScriptEditor.exe.config” file which is located in C:\Program Files (x86)\PowerGUI\ and comment the line #4 as shown below.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <!-- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />-->
        <supportedRuntime version="v2.0.50727" />
    </startup>


Restart the Power GUI editor after making the above change.

Tuesday, June 26, 2012

The security validation for this page is invalid. - SharePoint 2010

In my case I got this error while activating a feature. You might encounter this error during Feature activation using power shell script or STSADM. The exact error message would be follows
The security validation for this page is invalid. Click Back in your Web browser
, refresh the page, and try your operation again.        
Solution : You need to make sure you have set the AllowUnsafeUpdates to false somewhere in the feature activation code and your code expect it to be true to perform certain actions. You may change it back to False at the end of the feature receiver code.

Friday, June 8, 2012

An unexpected error occurred. Error 19106. - Performancepoint Dashboard Designer not working

When you try to access PP dashboard designer from BI Tools in SharePoint 2010 you get-

"The URL is not available, does not reference a SharePoint site, or you do not have permission to connect"

I fixed the above issue by trying following things in order

1. Recycle the app pool running the Performance Point service.

2. Restart the PerformancePoint service from central admin

3. Perform an IISRESET.

Please note in my case Designer Dashboard was working earlier and had stopped suddenly. If you are setting it up for the first time then you need to configure the performance point services to use this as Unattended Service Account to access data sources in service application settings in central admin.

Friday, May 25, 2012

Rename SharePoint 2010 Virtual Machine using STSADM

1. You need to be a member of the local Administrators group on the local computer in order to run STSADM command

2.On the drive on which SharePoint Server 2010 is installed, change to the following directory:

%COMMONPROGRAMFILES%Microsoft shared\Web server extensions\14\Bin.

3.Type the following command, and then press ENTER:

stsadm -o renameserver -oldservername <oldServerName> -newservername <newServerName>

4. Change Alternate Access Mappings pointing to new server name in the Central Administration appropriately

Monday, May 14, 2012

Understanding Remote BLOB Storage (RBS) in SharePoint 2010

Remote BLOB Storage (RBS) is a mechanism of storing the large unstructured data outside of the SharePoint database, by using a BLOB provider. It provides some useful options if the size of your SharePoint database is becoming unmanageable.

Why you might need RBS?

SharePoint is basically a document management system and one of its core features is that it stores document, lots of documents, and it stores all of those documents and document versions in an ever-expanding content database.

Databases are optimized for structured data that is relatively small – about 8KB per row. At that rate, you can put 130,000 packed-out rows into a database and still have a database under 1 gigabyte. Generally speaking, smaller databases are easier to backup, restore, and maintain, so keeping them small is good. Documents, however, tend to be orders of magnitude larger than the average database row size and can quickly bloat the database; a content database upwards of 100 gigabytes is by no means uncommon and that size is comprised mostly by the physical files that reside inside the database.

When your content database size starts to expand to the point of unmanageability, one of the first questions that may come to mind is why the heck are all those files in there in the first place? It makes perfect sense to store the structured document metadata like the author, location, keywords, document type, and file size directly in the database, for querying purposes, but the physical file itself is just taking up room until someone goes to download it. So the option to move files outside of the database and back into the file system, where they have traditionally resided, seems very sensible.

What is a Blob?

Documents tend to represent unstructured data that makes it difficult to use them in querying, defining relationships, indexing, or any other database operation that normally makes putting data into a database useful. As far as the database is concerned, a document is just a bunch of bits that it has to hold onto until someone asks for them back.

Logically, storing a document in a database row looks something like as shown in Figure 1.



Figure 1: Logical Representation of Document Storage in a Database

Databases performance is optimized for rows that are under 8KB in size. If the actual implementation looked as shown in Figure 1, that size would easily be breached and performance would lag.

Binary Large Object (BLOB) is a pointer that stores the location of binary data. The pointer, which is relatively small, resides with the normal database record. The binary data, which is comparatively huge, resides in some dark, magical location in the database called BLOB storage.



 Figure 2: Actual Representation of Document Storage in a Database


With the binary data offloaded to another location in the database, the database record becomes much smaller and more optimal for index and query performance. If we actually need the binary data associated with the row, the database uses the pointer in the row to acquire the binary data from BLOB storage. The process of going to BLOB storage is completely transparent, so it appears as though the data is coming directly from the row itself. There is a slight performance cost for going to BLOB storage for raw data retrieval, but the query performance benefits tend to outweigh the retrieval cost.

What is Remote Blob Storage?

BLOB storage is effectively abstracted from database users. You ask for it, the database goes out and gets it. This brings up a new question: why does the BLOB storage have to be in the database? In SQL Server 2005 it had to be in the database simply because that's how they built it. But in SQL 2008, you've got a few more options because Microsoft implemented a FileStream provider model for the BLOB storage mechanism that opens up the possibility of storing it elsewhere, as shown in Figure 3.



Figure 3: Remote BLOB Storage Provider Mechanism

Remote BLOB Storage is the term used to denote that a BLOB provider stores BLOB data outside of the database (i.e. remotely).

Where Can I Store Remote Blob Data?

Remote BLOB data can be stored anywhere you want as long there is a provider available capable of storing it there. Out of the box you get two providers:

· Native SQL BLOB Provider (Default)
Stores BLOB data directly in the database, just like SQL Server 2005. This is the default BLOB provider whenever you setup a new instance of SQL server.

· FileStream BLOB Provider
This is the only Remote BLOB provider that ships with SQL Server 2008 and it allows you to store BLOB data on any local hard drive on the SQL server.

Please note that you cannot use the FileStream BLOB provider to store data on a network share or a mapped drive. It has to be a physical disk on the server. However there are a few third party providers who make this possible. To name a few-

· AvePoint – RBS provider for network shares, FTP, and cloud storage. This is also a FREE provider!

· EMC2 – RBS provider for Centera storage devices.

· NetApp – RBS provider for the NetApp SnapManager 6.0 product line.

· OpenText – RBS provider that supports Hitachi Data Systems, StorageTek, Network Appliance, EMC Centera, HP, IBM, and Sun Microsystems.

· Storage Point – RBS provider for SAN, NAS, and cloud storage.

What are the drawbacks of Remote BLOB Storage?

One of the major side effects of RBS is that you cannot use database mirroring when RBS is enabled. Clustering and log shipping are still supported, but if you currently use or plan to use mirroring then RBS is probably not an approach you want to consider.

You should be aware that individual RBS providers may or may not support native SQL backups. Fortunately, the FileStream RBS provider supports native SQL backups, but others may not, so you need to read the documentation of your RBS provider to ensure that your backup strategy is getting everything you need. SharePoint backups, however, will include any files stored in BLOB storage regardless of whether the RBS provider supports native SQL backups.

You should also be very wary of the fact that data is being stored in a location outside of the database and any implications that may have for security and reliability. With the FileStream provider, for example, BLOBS are stored directly on the file system. You can actually navigate right to them using Explorer and delete them, which of course would be bad. So with the FileStream RBS provider you need to make sure that the appropriate security is in place to protect your blob data from accidental deletion.

Another issue you may encounter is that BLOB retrieval performance may be negatively impacted if you move the BLOB store to a slower hard drive. This can also be true if the BLOB store is hosted on a networked location where bandwidth is limited or latency is an issue. On the other hand, BLOB retrieval performance may improve if the hard drive you place it on is faster than the SQL drive. So don't skimp on the hardware!

It is also worth noting that RBS is enabled at the content database level, not the site collection level. This means that if you have multiple site collections in a content database, enabling RBS on that content database enables RBS on all of those site collections. If this is not the desired behavior, then you may need to move site collections to other content databases.

Finally, Microsoft has stated that it is not guaranteeing that RBS will seamlessly migrate to the next version of SharePoint. You can always "undo" RBS and pull everything back into the database, so you won't be completely out of luck during the next upgrade.

What are the benefits of Remote BLOB Storage?

Following is a brief rundown of some of the benefits associated with RBS:

· Database size is reduced. Having a smaller database can be extremely beneficial if you are running out of disk space on your SQL server and don't have the ability to add additional disks.

· Prolongs use of SQL Express. If you are using SQL Express in your SharePoint environment but you are bumping up against the 4 gigabyte database size limit (10 gigabytes in R2) associated with the free edition of SQL Server, then you can use RBS to offload data from the database. Since the data is not in directly in the database it does not count against the size quota.

· Cheaper file storage. Database hard drives tend to be fast and expensive, so archiving a large number of files that are rarely accessed on those disks is not always the best use of fiscal resources. In as much as RBS allows you to move BLOB storage to fast hard drives and see a performance benefit, you can also move them to slower, cheaper hard drives for a budgetary boost when performance is not as much of a concern.

· Database backup time reduced. As database size increases, so does the time to back up the database. If you have a specific maintenance window in which the backup has to occur, the database can grow so large that it becomes difficult or impossible to complete in that time frame. By offloading the BLOB store, the database size is reduced and the database backup time can be reduced as well. You will still need to make a backup of the BLOB store, but that can be done using a separate parallel process.

· Large BLOB performance benefits. Streaming data from a file stream can outperform streaming data directly from a database. However, setting up SQL server for use of a remote file stream is an expensive process. For small files (less than 60KB), it may not be beneficial to bother with a file stream at all. For larger files it can be very beneficial. Fortunately, RBS allows you to configure certain file size thresholds to store smaller files directly in the database and larger files using RBS, so they reside in a location where performance is optimal.


Backing up a Database Without BLOBs

One of the reasons people tend to remove BLOBs from their database is to reduce backup time, but if your RBS provider supports native SQL backups then the BLOBs end up in the backup anyway so you don't really save much time. How do you avoid this? BLOBs are all placed in a specific file group, so you'll have to employ a backup strategy that explicitly excludes the BLOB file group from the backup, or else you're backup is probably going to be larger than you want. Also remember, if you exclude the BLOBs from your SQL backup, then you will want to implement a separate backup process for the BLOBs.

What is the RBS Maintainer?

RBS Maintainer is a utility application that is responsible for performing garbage collection on the remote BLOB store. You will need to setup a scheduled task to run RBS maintainer with settings that work for your database and file store backup strategy. You can find information on configuring the RBS Maintainer in the TechNet article Maintain Remote BLOB Storage (RBS) (SharePoint Foundation 2010).

Are There Alternatives to RBS?

If you are encountering size issues with a single content database and do not want to implement RBS in your environment, then one option to consider is moving some of your site collections into a separate content database. If you only have one site collection in your content database, then you may want to consider identifying some of your larger sub-webs and turning them into their own site collections. Although this will not reduce the overall size of the databases on your system, having two smaller databases can help performance and opens up the possibility of running parallel tasks (e.g. database backups) if you are pushing the limit with your maintenance windows.

How to Enable the RBS FileStream Provider for SharePoint 2010

Walk through on how to enable the out-of-the-box FileStream provider for SharePoint 2010. If you want to use a third-party RBS provider, then you'll need to use their documentation.

In the sections that follow, any items in italicized red will need to be updated with appropriate values for your environment. For example, any place you see [ContentDbName], will need to be replaced with the name of the content database for the SharePoint site for which you wish to enable RBS.

Step 1 – Enable Filestream Access on the SQL Server

You'll need to complete the following steps to enable Filestream access on the SQL Server Box:

· Click on the Start menu

· Type SQL Server Configuration Manager in the 'Search Programs and Files' textbox

• In the list of results you should see the SQL Server Configuration Manager icon appear

· Right click on the icon and choose Run as administrator from the context menu
· In the left pane, click on the SQL Server Services icon

• You may need to double click or right click on this icon and select Open

• The right pane should populate with SQL Server services running on the server

· In the right pane, right click on the instance of SQL server for which you wish to enable RBS and choose Properties from the context menu

• The SQL Server Properties dialog should appear

· Click on the FILESTREAM tab

· Check the box named Enable FILESTEAM for Transact-SQL access

· Check the box named Enable FILESTREAM for file I/O streaming access

· Leave the default value for the Window share name (it should be set to MSSQLSERVER)

· Check the box named Allow remote clients to have streaming access to FILESTREAM data

· Click OK

Step 2 – Configure the filestream_access_level Setting

Next, you will need to open SQL Management studio and execute the following command:

EXEC sp_configure filestream_access_level, 2

RECONFIGURE

The sp_configure command is responsible for displaying or changing global configuration settings for the database server. In this case, we need to set the filestream_access_level value which has three possible settings:

· 0 – FILESTREAM support is disabled (default value)

· 1 – FILESTREAM support for T-SQL is enabled

· 2 – FILESTREAM support for T-SQL and Win32 streaming is enabled

So, the command listed above enables FILESTREAM for T-SQL and Win32 streaming. You can read more about this command here: sp_configure (Transact-SQL).

Step 3 – Create the master key if it does not already exist

Execute the following command in SQL Management Studio:

USE [ContentDbName]

IF NOT EXISTS ( SELECT *

FROM [sys.symmetric_keys]

WHERE [name] = N'##MS_DatabaseMasterKey##' )

CREATE MASTER KEY ENCRYPTION BY PASSWORD = N'Admin Key Password !2#4'

This command determines if the master encryption key exists, and if not, creates it using the specified password. The master key is used to encrypt other keys stored in the database. You can read more about this command here: CREATE MASTER KEY (T-SQL). Make sure you remember the password you used in this command.

Step 4 – Create a File Group for the FileStream Provider

Execute the following command in SQL Management Studio:

USE [ContentDbName]

IF NOT EXISTS ( SELECT [groupname]

FROM [sysfilegroups]

WHERE [groupname] = N'RBSFilestreamProvider' )

ALTER DATABASE [ContentDbName]

ADD FILEGROUP RBSFILESTREAMPROVIDER CONTAINS FILESTREAM

This command creates a filegroup for the FileStream provider named RBSFileStreamProvider. If you want, you can name it something different. You can read more about this command here: ALTER DATABASE File and Filegroup Options (Transact-SQL).

Step 5 – Define the physical location where BLOB data is stored

Execute the following command in SQL Management Studio:


USE [ContentDbName]

ALTER DATABASE [ContentDbName]

ADD FILE (name = RBSFilestreamFile, filename = 'c:\Blobstore')

TO FILEGROUP RBSFilestreamProvider

This command adds a file named RBSFileStreamFile to the RBSFileStreamProvider file group you created in Step 2. You will need to replace 'c:\Blobstore' with the location where you wish to store BLOB data. This value MUST be a location on a physical hard drive directly on the SQL server. No UNC paths or networked drives are allowed. You can read more about this command here: ALTER DATABASE File and Filegroup Options (Transact-SQL).

Step 6 – Install RBS on the SQL Server Box

First, you will need to download RBS_X64.msi, but DO NOT INSTALL IT by double clicking on the icon once it is downloaded. Instead, do the following:

· Click on the Start menu

· Type cmd in the 'Search Programs and Files' textbox

• In the list of results you should see the cmd.exe icon appear

· Right click on the cmd.exe icon and choose Run as administrator from the context menu

· Navigate to directory where you downloaded the RBS_X64.msi file

· Type the following command:

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true

FILEGROUP=PRIMARY

DBNAME="" DBINSTANCE=""

FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1

You will need to type this on a single line and replace with the server name of your SQL machine. If you have a named instance you will need to use the named instance syntax for the server name (e.g. server/InstanceName). The parameter rbs_install_log.txt defines the location where the installation log is written, and the FILESTREAMFILEGROUP parameter should be equal to the FILEGROUP name created in Step 2.

When you run this command from the command prompt, it runs asynchronously, so it appears to complete almost instantly. In reality, it takes about a minute to complete. You can determine whether or not the installation succeeded by looking at the installation log file (rbs_install_log.txt). There should be a message near the end of the file (you may have to scroll up a bit from the end to find it) that says

Product: SQL Remote Blob Storage – Installation completed successfully

If you do not find this message, read through the log looking for information about what went wrong and try to remedy those issues.

Step 7 – Install RBS on All Other SharePoint Farm Servers

To work correctly, RBS must be installed on the SQL Server and every other machine in the SharePoint farm – so this step needs to be repeated on each additional server in the farm. Please note, however, that the RBS installation is slightly different after you've done the initial installation outlined in Step 4. For each additional server in the farm, you'll need to open the command prompt with run as administrator in the same way outlined in Step 4, but you'll need to execute the following command to install RBS instead of the one from Step 4:

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi

DBNAME="" DBINSTANCE=""


ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"

The installation works the same way – it should take about a minute and you'll be able to determine if installation was successful by looking at the installation log.

Note that if you are running SQL server directly on one of the machines in your SharePoint farm then there is no need to run the RBS installation a second time on the same box. Just move on to the next server in the farm.

Step 8 – Enable RBS on the Content Database

On one of the web servers in your SharePoint farm, complete the following steps:

· Click on the Start menu

· Type SharePoint 2010 Management Shell in the 'Search Programs and Files' textbox

• In the list of results you should see the SharePoint 2010 Management Shell icon appear

· Right click on the icon and choose Run as administrator from the context menu

· Type the following PowerShell commands

• Each of these commands should be typed on their own line

$contentDB = Get-SPContentDatabase –WebApplication

$rbsSettings = $contentDB.RemoteBlobStorageSettings

$rbsSettings.Enable()

$rbsSettings.SetActiveProviderName($rbsSettings.GetProviderNames()[0])

The first line of the PowerShell script creates a variable called $contentDB that is populated with the content database object for the specified web application; you will need to provide the URL of the web application for which you wish to enable RBS. The second line creates a variable called $rbsSettings and populates it with the remote blob storage configuration settings for the content database. The last two lines enable RBS for the content database and set the provider name to the FILESTREAM provider. Once these commands have been completed, RBS should be enabled on your SharePoint site.

Step 9 – Verify RBS is Working

You can test whether RBS is working by completing the following:

· Use Windows Explorer to browse to the folder containing the blob storage folder specified in step 5

• For example, If you specified c:\Blobstore as the blob store location, then you would browse to c:\ so you can see the Blobstore folder

· Right click on the blob storage folder and choose Properties from the context menu

· Note the size of the folder

· Upload a file that is larger than 100 KB to a document library in the SharePoint site where RBS is enabled

· Verify that the upload succeeded by downloading the file from the document library and making sure it downloads successfully

· Right click on the blob storage folder and choose Properties from the context menu

· Verify that the size of the folder has grown by the size of the file you just uploaded

• If you uploaded a 100 KB file then the folder size should be 100 KB larger than before.

• If you uploaded a 5 MB file then the folder size should be 5 MB larger than before, etc.


Step 10 – Migrate Existing Documents from the Database to the Remote Blob Store

Once you have RBS working, migrating documents is really easy. You just have to complete the following steps:

· Click on the Start menu

· Type SharePoint 2010 Management Shell in the 'Search Programs and Files' textbox

• In the list of results you should see the SharePoint 2010 Management Shell icon appear

· Right click on the icon and choose Run as administrator from the context menu

· Type the following PowerShell commands

• Each of these commands should be typed on their own line

$contentDB = Get-SPContentDatabase –WebApplication

$rbsSettings = $contentDB.RemoteBlobStorageSettings

$rbsSettings.Migrate()

Please note that when you run this command the server begins copying data from the database to the file system. If you've got a lot of data in the database, it may take a while.

How Do I Disable RBS?
If you decide that you do not want to use RBS to store your BLOB data remotely, you can always disable RBS. To do so you will need to complete the following steps:

· Click on the Start menu
· Type SharePoint 2010 Management Shell in the 'Search Programs and Files' textbox

• In the list of results you should see the SharePoint 2010 Management Shell icon appear

· Right click on the icon and choose Run as administrator from the context menu
· Type the following PowerShell commands

• Each of these commands should be typed on their own line

$contentDB = Get-SPContentDatabase –WebApplication


$rbsSettings = $contentDB.RemoteBlobStorageSettings


$rbsSettings.SetActiveProviderName("")

After you execute this command, any new BLOB data is written directly to the database. Existing BLOB data will remain in the remote BLOB store until it is migrated back to the database. To migrate it back to the database, just follow the instructions from Step 10 and the data will be migrated back to the database (once again, this can take some time). If you are wondering why it will go back to the database this time, it's because the Migrate() method moves data to the current provider, and in this step you've specified a new provider– the default SQL provider that stores BLOB data directly in the database.

Please note that Microsoft highly recommends that you do not try to uninstall RBS! Just disable it.

Reference -
http://www.simple-talk.com/content/print.aspx?article=1280



http://blogs.technet.com/b/pramodbalusu/archive/2011/07/09/rbs-and-sharepoint-2010.aspx

Thursday, May 10, 2012

Bitlocker - Recovery Key Issue while booting - Windows 7

Bitlocker requests recovery key every time the system boots.

Solution is very simple-
Go to
1. Control Panel >> System and Security >> BitLocker Drive Encryption
2. Click on Suspend Protection
3. Click on Enable Protection
4. Reboot the system.

Your problem should be fixed now :-)

This CPU is VT-Capable but VT is not enabled

This happens when you try to use 64bit virtual machine using VM player (in my case) on a brand new 64bit machine(Lenovo Thinkpad in my case).

Solution for this issue is:

Go to BIOS settings >> Config >> Virtualization >> Virtualization Technology >> Enabled.

By default VT is disabled.

Monday, April 16, 2012

System.Runtime.InteropServices.ExternalException: GDI+ is not properly initialized (internal GDI+ error) - SharePoint 2010

IIS reset fixes this issue temporarily.

Microsoft has a hotfix for this. http://support.microsoft.com/kb/975410/ 

It applies to: 
Microsoft ASP.NET 2.0
Microsoft .NET Framework 2.0 Service Pack 2

The hotfix would replace the following file with the following attributes. For all supported x86-based version and x64-based versions of the .NET Framework 2.0 in Windows 7 or in Windows Server 2008 R2

File name                       File version           File size       Date               Time  Platform
System.drawing.dll       2.0.50727.5652      626,688      11-Feb-2011   23:31  x86

Monday, April 9, 2012

Use your iPad as a Windows 7 tablet using PocketCloud from WYSE.

You can connect to your home or office laptop from iPad as if you are running Windows on your iPad. It's amazing!!! Just install PocketCloud in your Laptop and use gmail account! WYSE has made it as much non-technical as possible. Impressive!!

Wednesday, April 4, 2012

Document locked as Read only by System Account in SharePoint 2010

Document becomes locked as Read only by System Account and no one would be able to edit document or undo checkout or override checkout or delete it.

This can be solved by
You must be a site collection admininstrator

2. Go to Site Settings/Record Declaration Settings

3. In the second section - Manual record declaration in lists and libraries should be: ---> Click the radio button for Available in All Locations by Default

4. Go back to your library (Where you cannot delete the file)

5. Click the ribbon - Library Tools/Documents -- You should see a new item to the right of the Edit Properties Button: Declare Record --image

6. Now you should be able to select the document, and select Compliance Details and the undeclare as a record link will be active

7. Undeclare the record

8. Delete the record.

Tuesday, February 28, 2012

HTTP 503-Service Unavailable error in SharePoint - HTTPERR log

C:\WINDOWS\system32\LogFiles\HTTPERR

HTTP/1.1 GET / 503 565877983 Disabled

The above problem can be fixed by recyling the associated application pool and restting IIS.

Custom timer job stuck in Initialized state - Solved

1. Stop Windows SharePoint Services Timer on Windows Services
2. Go to ‘C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config’ on front-end server
3. Clear xml files from the above folder.
4. Open cache.ini file and restart the number into ‘1’
5. Start Windows SharePoint Services Timer on Windows Services

The above steps clear SharePoint Config cache and allow the timer jobs to run properly

Friday, February 24, 2012

Enable Site Usage reports MOSS 2007

Following tasks need to be performed to enable site usage reports
1. Enable Usage Logging in Central Administration.
2. Enable Usage Reporting on SSP Admin Page .
3. Activate the Reporting Feature for the Site Collection .

Configure Advanced Usage Analysis Processing Error 403

To fix this issue, make the user is given permissions under Shared Services Administration 'Personalization services permissions'

Accessing site and web object in SharePoint feature receiver

using (SPSite site = properties.Feature.Parent as SPSite)
{
using (SPWeb currentWeb = site.OpenWeb())
{ }
}

Thursday, February 23, 2012

Hiding Title column in custom list programattically.

Dont assume that the column is Title. The internal name is LinkTitle

SPView listView = list.DefaultView;
SPViewFieldCollection listViewFieldColl = listView.ViewFields;
listViewFieldColl.Delete("LinkTitle");
listView.Update();

Sending emails from SharePoint using SPUtility

Method 1
--------
using (SPSite site = new SPSite(siteURL))
{
using (SPWeb web = site.OpenWeb())
{
try
{
readEmailIDs();
StringDictionary headers = new StringDictionary();

headers.Add("to", strRecepients);
//headers.add("cc", "manager@test.com");
//headers.add("bcc", "user@test.com");
headers.Add("from", strFromAddress);

headers.Add("subject", strSubject);
headers.Add("content-type", "text/html");
bool success = SPUtility.SendEmail(web, headers, strEmailContent);

}
catch (Exception e)
{

}
}
}


Method 2:
----------

using (SPSite site = new SPSite(siteURL))
{
using (SPWeb web = site.OpenWeb())
{
try
{

string subject = strSubject;
string body = emailContent;
string subject = strSubject;
string body = "BodyText";
bool success = SPUtility.SendEmail(web, true, false, toField, strSubject, strEmailText);

}
catch (Exception e)
{

}
}
}

Monday, February 20, 2012

CSS Reference Chart for SharePoint 2007

Useful reference

http://www.heathersolomon.com/content/sp07cssreference.htm

Thursday, February 16, 2012

Value was either too large or too small for a Uint32 - Storage space allocation error

The error may be cause by the exceptions when convert a negative value to UInt32.


Please do the following steps to diagnose the issue,

1. Log onto the SQL database server which your SharePoint site is based on.

2. Start the “Microsoft SQL Server Management Studio”.

3. Run the following SQL Statement in the content database of your site (You can check your content database name by Central Administration > Application Management > Content Databases):



Select

(select webs.FullUrl from webs where webs.Id = tp_WebId) as [siteurl],

*

From AllLists

Where tp_ItemCount < 0

Order by tp_ItemCount



If there are some records returned, you could located the lists from the [siteurl] and [tp_Title] column.

You can recreate the corrupted lists to solve the issue.

Tuesday, February 14, 2012

Visual Studio shortcut keys

Source- http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx

General
Shortcut Description
Ctrl-X or
Shift-Delete Cuts the currently selected item to the clipboard
Ctrl-C or
Ctrl-Insert Copies the currently selected item to the clipboard
Ctrl-V or
Shift-Insert Pastes the item in the clipboard at the cursor
Ctrl-Z or
Alt-Backspace Undo previous editing action
Ctrl-Y or
Ctrl-Shift-Z Redo the previous undo action
Ctrl-Shift-V or
Ctrl-Shift-Insert Pastes an item from the clipboard ring tab of the Toolbox at the cursor in the file and automatically selects the pasted item. Cycle through the items on the clipboard by pressing the shortcut keys repeatedly
Esc
Closes a menu or dialog, cancels an operation in progress, or places focus in the current document window
Ctrl-S
Saves the selected files in the current project (usually the file that is being edited)
Ctrl-Shift-S
Saves all documents and projects
Ctrl-P
Displays the Print dialog
F7
Switches from the design view to the code view in the editor
Shift-F7
Switches from the code view to the design view in the editor
F8
Moves the cursor to the next item, for example in the TaskList window or Find Results window
Shift-F8
Moves the cursor to the previous item, for example in the TaskList window or Find Results window
Shift-F12
Finds a reference to the selected item or the item under the cursor
Ctrl-Shift-G
Opens the file whose name is under the cursor or is currently selected
Ctrl-/
Switches focus to the Find/Command box on the Standard toolbar
Ctrl-Shift-F12
Moves to the next task in the TaskList window
Ctrl-Shift-8
Moves backward in the browse history. Available in the object browser or Class View window
Alt-Left Arrow
Go back in the web browser history
Alt-Right Arrow
Go forward in the web browser history



Text navigation
Shortcut Description
Left Arrow
Moves the cursor one character to the left
Right Arrow
Moves the cursor one character to the right
Down Arrow
Moves the cursor down one line
Up Arrow
Moves the cursor up one line
Page Down
Scrolls down one screen in the editor window
Page Up
Scrolls up one screen in the editor window
End
Moves the cursor to the end of the current line
Home
Moves the cursor to the beginning of the line. If you press Home when the cursor is already at the start of the line, it will toggle the cursor between the first non-whitespace character and the real start of the line
Ctrl-End
Moves the cursor to the end of the document
Ctrl-Home
Moves the cursor to the start of the document
Ctrl-G
Displays the Go to Line dialog. If the debugger is running, the dialog also lets you specify addresses or function names to go to
Ctrl-]
Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing brace and vice versa
Ctrl-K, Ctrl-N
Moves to the next bookmark in the document
Ctrl-K, Ctrl-P
Moves to the previous bookmark
Ctrl-K, Ctrl-I
Displays Quick Info, based on the current language
Ctrl-Down Arrow
Scrolls text down one line but does not move the cursor. This is useful for scrolling more text into view without losing your place. Available only in text editors
Ctrl-Up Arrow
Scrolls text up one line but does not move the cursor. Available only in text editors
Ctrl-Right Arrow
Moves the cursor one word to the right
Ctrl-Left Arrow
Moves the cursor one word to the left
Ctrl-Shift-1
Navigates to the next definition, declaration, or reference of an item. Available in the object browser and Class View window. Also available in source editing windows if you have already used the Edit.GoToReference (Shift-F12) shortcut
Ctrl-Shift-2
Navigates to the previous definition, declaration, or reference of an item



Text manipulation
Shortcut Description
Enter
Inserts a new line
Delete
Deletes one character to the right of the cursor
Insert
Toggles between insert and overtype insertion modes
Tab
Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop
Shift-Tab
Moves current line or selected lines one tab stop to the left
Backspace or
Shift-Backspace Deletes one character to the left of the cursor
Ctrl-K, Ctrl-C
Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language
Ctrl-K, Ctrl-U
Removes the comment syntax from the current line or currently selected lines of code
Ctrl-T or
Shift-Enter Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors
Ctrl-K, Ctrl-L
Removes all unnamed bookmarks in the current document
Ctrl-M, Ctrl-O
Automatically determines logical boundaries for creating regions in code, such as procedures, and then hides them. This collapses all such regions in the current document
Alt-Right Arrow or
Ctrl-Spacebar Displays statement completion based on the current language or autocompletes word if existing text unambiguously identifies a single symbol
Ctrl-K, Ctrl-\
Removes horizontal whitespace in the selection or deletes whitespace adjacent to the cursor if there is no selection
Ctrl-K, Ctrl-F
Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog to the selected text.
Ctrl-L
Cuts all selected lines or the current line if nothing has been selected to the clipboard
Ctrl-Shift-L
Deletes all selected lines or the current line if no selection has been made
Ctrl-Enter
Inserts a blank line above the cursor
Ctrl-Shift-Enter
Inserts a blank line below the cursor
Shift-Alt-T
Moves the line containing the cursor below the next line
Ctrl-J
Lists members for statement completion when editing code
Ctrl-U
Changes the selected text to lowercase characters
Ctrl-Shift-U Changes the selected text to uppercase characters
Ctrl-Shift-Spacebar
Displays a tooltip that contains information for the current parameter, based on the current language
Ctrl-M, Ctrl-U
Removes the outlining information for the currently selected region
Ctrl-M, Ctrl-P
Removes all outlining information from the entire document
Ctrl-R, Ctrl-P
Swaps the anchor and endpoint of the current selection
Ctrl-M, Ctrl-L
Toggles all previously marked hidden text sections between hidden and display states
Ctrl-K, Ctrl-K
Sets or removes a bookmark at the current line
Ctrl-M, Ctrl-M
Toggles the currently selected hidden text section or the section containing the cursor if there is no selection between the hidden and display states
Ctrl-K, Ctrl-H
Sets or removes a shortcut in the tasklist to the current line
Ctrl-R, Ctrl-R
Enables or disables word wrap in an editor
Ctrl-R, Ctrl-W
Shows or hides spaces and tab marks
Ctrl-Delete
Deletes the word to the right of the cursor
Ctrl-Backspace
Deletes the word to the left of the cursor
Ctrl-Shift-T
Transposes the two words that follow the cursor. (For example, |End Sub would be changed to read Sub End|.)
Ctrl-.[dot] Display options on smarttag menu.
Very useful for showing using/Imports options.


return to top


Text selection
Shortcut Description
Shift-Left Arrow
Moves the cursor to the left one character, extending the selection
Shift-Alt-Left Arrow
Moves the cursor to the left one character, extending the column selection
Shift-Right Arrow
Moves the cursor to the right one character, extending the selection
Shift-Alt-Right Arrow
Moves the cursor to the right one character, extending the column selection
Ctrl-Shift-End
Moves the cursor to the end of the document, extending the selection
Ctrl-Shift-Home
Moves the cursor to the start of the document, extending the selection
Ctrl-Shift-]
Moves the cursor to the next brace, extending the selection
Shift-Down Arrow
Moves the cursor down one line, extending the selection
Shift-Alt-Down Arrow
Moves the cursor down one line, extending the column selection
Shift-End
Moves the cursor to the end of the current line, extending the selection
Shift-Alt-End
Moves the cursor to the end of the line, extending the column selection
Shift-Home
Moves the cursor to the start of the line, extending the selection
Shift-Alt-Home
Moves the cursor to the start of the line, extending the column selection
Shift-Up Arrow
Moves the cursor up one line, extending the selection
Shift-Alt-Up Arrow
Moves the cursor up one line, extending the column selection
Shift-Page Down
Extends selection down one page
Shift-Page Up
Extends selection up one page
Ctrl-A
Selects everything in the current document
Ctrl-W
Selects the word containing the cursor or the word to the right of the cursor
Ctrl-=
Selects from the current location in the editor back to the previous location in the navigation history
Ctrl-Shift-Page Down
Moves the cursor to the last line in view, extending the selection
Ctrl-Shift-Page Up
Moves the cursor to the top of the current window, extending the selection
Ctrl-Shift-Alt-Right Arrow
Moves the cursor to the right one word, extending the column selection
Ctrl-Shift-Left Arrow
Moves the cursor one word to the left, extending the selection
Ctrl-Shift-Alt-Left Arrow
Moves the cursor to the left one word, extending the column selection


return to top


Project related
Shortcut Description
Ctrl-Shift-B
Builds the solution
Ctrl-N
Displays the New File dialog. Note: files created this way are not associated with a project. Use Ctrl-Shift-A to add a new file in a project
Ctrl-Shift-N
Displays the New Project dialog
Ctrl-O
Displays the Open File dialog
Ctrl-Shift-O
Displays the Open Project dialog
Shift-Alt-A
Displays the Add Existing Item dialog
Ctrl-Shift-A
Displays the Add New Item dialog
Ctrl-Alt-Insert
Allows you to override base class methods in a derived class when an overridable method is highlighted in the Class View pane



Window manipulation
Shortcut Description
Shift-Alt-Enter
Toggles full screen mode
Ctrl-+
Goes back to the previous location in the navigation history. (For example, if you press Ctrl-Home to go to the start of a document, this shortcut will take the cursor back to wherever it was before you pressed Ctrl-Home.)
Ctrl-Shift-+
Moves forward in the navigation history. This is effectively an undo for the View.NavigateBackward operation
Ctrl-F4
Closes the current MDI child window
Shift-Esc
Closes the current tool window
Ctrl-F2
Moves the cursor to the navigation bar at the top of a code view
Ctrl-Tab
Cycles through the MDI child windows one window at a time
Ctrl-F6,
Ctrl-Shift-Tab Moves to the previous MDI child window
Alt-F6,
Ctrl-Shift-F6 Moves to the next tool window
Shift-Alt-F6
Moves to the previously selected window
F6
Moves to the next pane of a split pane view of a single document
Shift-F6
Moves to the previous pane of a document in split pane view
Ctrl-Pagedown
Moves to the next tab in the document or window (e.g., you can use this to switch the HTML editor from its design view to its HTML view
Ctrl-PageUp
Moves to the previous tab in the document or window



Control editor (designer)
Shortcut Description
Ctrl-Down Arrow
Moves the selected control down in increments of one on the design surface

Down Arrow Moves the selected control down to the next grid position on the design surface
Ctrl-Left Arrow
Moves the control to the left in increments of one on the design surface
Left Arrow
Moves the control to the left to the next grid position on the design surface
Ctrl-Right Arrow
Moves the control to the right in increments of one on the design surface
Right Arrow
Moves the control to the right into the next grid position on the design surface
Ctrl-Up Arrow
Moves the control up in increments of one on the design surface
Up Arrow
Moves the control up into the next grid position on the design surface
Tab
Moves to the next control in the tab order
Shift-Tab
Moves to the previous control in the tab order
Ctrl-Shift-Down Arrow
Increases the height of the control in increments of one on the design surface
Shift-Down Arrow
Increases the height of the control to the next grid position on the design surface
Ctrl-Shift-Left Arrow
Reduces the width of the control in increments of one on the design surface
Shift-Left Arrow
Reduces the width of the control to the next grid position on the design surface
Ctrl-Shift-Right Arrow
Increases the width of the control in increments of one on the design surface
Shift-Left Arrow
Increases the width of the control to the next grid position on the design surface
Ctrl-Shift-Up Arrow
Decreases the height of the control in increments of one on the design surface
Shift-Up Arrow
Decreases the height of the control to the next grid position on the design surface


return to top


Search and replace
Shortcut Description
Ctrl-F
Displays the Find dialog
Ctrl-Shift-F
Displays the Find in Files dialog
F3
Finds the next occurrence of the previous search text
Ctrl-F3
Finds the next occurrence of the currently selected text or the word under the cursor if there is no selection
Shift-F3
Finds the previous occurrence of the search text
Ctrl-Shift-F3
Finds the previous occurrence of the currently selected text or the word under the cursor
Ctrl-D
Places the cursor in the Find/Command line on the Standard toolbar
Alt-F3, H
Selects or clears the Search Hidden Text option for the Find dialog
Ctrl-I
Starts an incremental search—after pressing Ctrl-I, you can type in text, and for each letter you type, VS.NET will find the first occurrence of the sequence of letters you have typed so far. This is a very convenient facility, as it lets you find text by typing in exactly as many characters as are required to locate the text and no more. If you press Ctrl-I a second time without typing any characters, it recalls the previous pattern. If you press it a third time or you press it when an incremental search has already found a match, VS.NET searches for the next occurrence.
Alt-F3, C
Selects or clears the Match Case option for Find and Replace operations
Alt-F3, R
Selects or clears the Regular Expression option so that special characters can be used in Find and Replace operations
Ctrl-H
Displays the Replace dialog
Ctrl-Shift-H
Displays the Replace in Files dialog
Ctrl-Shift-I
Performs an incremental search in reverse direction
Alt-F3, S
Halts the current Find in Files operation
Alt-F3, B
Selects or clears the Search Up option for Find and Replace operations
Alt-F3, W
Selects or clears the Match Whole Word option for Find and Replace operations
Alt-F3, P
Selects or clears the Wildcard option for Find and Replace operations


return to top


Help
Shortcut Description
Ctrl-Alt-F1
Displays the Contents window for the documentation
Ctrl-F1
Displays the Dynamic Help window, which displays different topics depending on what items currently have focus. If the focus is in a source window, the Dynamic Help window will display help topics that are relevant to the text under the cursor
F1
Displays a topic from Help that corresponds to the part of the user interface that currently has the focus. If the focus is in a source window, Help will try to display a topic relevant to the text under the cursor
Ctrl-Alt-F2
Displays the Help Index window
Shift-Alt-F2
Displays the Index Results window, which lists the topics that contain the keyword selected in the Index window
Alt-Down Arrow
Displays the next topic in the table of contents. Available only in the Help browser window
Alt-Up Arrow
Displays the previous topic in the table of contents. Available only in the Help browser window
Ctrl-Alt-F3
Displays the Search window, which allows you to search for words or phrases in the documentation
Shift-Alt-F3
Displays the Search Results window, which displays a list of topics that contain the string searched for from the Search window.
Shift-F1
Displays a topic from Help that corresponds to the user interface item that has the focus


return to top


Debugging
Shortcut Description
Ctrl-Alt-V, A
Displays the Auto window to view the values of variables currently in the scope of the current line of execution within the current procedure
Ctrl-Alt-Break
Temporarily stops execution of all processes in a debugging session. Available only in run mode
Ctrl-Alt-B
Displays the Breakpoints dialog, where you can add and modify breakpoints
Ctrl-Alt-C
Displays the Call Stack window to display a list of all active procedures or stack frames for the current thread of execution. Available only in break mode
Ctrl-Shift-F9
Clears all of the breakpoints in the project
Ctrl-Alt-D
Displays the Disassembly window
Ctrl-F9
Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work
Ctrl-Alt-E
Displays the Exceptions dialog
Ctrl-Alt-I
Displays the Immediate window, where you can evaluate expressions and execute individual commands
Ctrl-Alt-V, L
Displays the Locals window to view the variables and their values for the currently selected procedure in the stack frame
Ctrl-Alt-M, 1
Displays the Memory 1 window to view memory in the process being debugged. This is particularly useful when you do not have debugging symbols available for the code you are looking at. It is also helpful for looking at large buffers, strings, and other data that does not display clearly in the Watch or Variables window
Ctrl-Alt-M, 2
Displays the Memory 2 window
Ctrl-Alt-M, 3
Displays the Memory 3 window
Ctrl-Alt-M, 4
Displays the Memory 4 window
Ctrl-Alt-U
Displays the Modules window, which allows you to view the .dll or .exe files loaded by the program. In multiprocess debugging, you can right-click and select Show Modules for all programs
Ctrl-B
Opens the New Breakpoint dialog
Ctrl-Alt-Q
Displays the Quick Watch dialog with the current value of the selected expression. Available only in break mode. Use this command to check the current value of a variable, property, or other expression for which you have not defined a watch expression
Ctrl-Alt-G
Displays the Registers window, which displays CPU register contents
Ctrl-Shift-F5
Terminates the current debugging session, rebuilds if necessary, and then starts a new debugging session. Available in break and run modes
Ctrl-Alt-N
Displays the Running Documents window that displays the set of HTML documents that you are in the process of debugging. Available in break and run modes
Ctrl-F10
Starts or resumes execution of your code and then halts execution when it reaches the selected statement. This starts the debugger if it is not already running
Ctrl-Shift-F10
Sets the execution point to the line of code you choose
Alt-NUM *
Highlights the next statement to be executed
F5
If not currently debugging, this runs the startup project or projects and attaches the debugger. If in break mode, this allows execution to continue (i.e., it returns to run mode).
Ctrl-F5
Runs the code without invoking the debugger. For console applications, this also arranges for the console window to stay open with a "Press any key to continue" prompt when the program finishes
F11
Executes code one statement at a time, tracing execution into function calls
Shift-F11
Executes the remaining lines of a function in which the current execution point lies
F10
Executes the next line of code but does not step into any function calls
Shift-F5
Available in break and run modes, this terminates the debugging session
Ctrl-Alt-V, T
Displays the This window, which allows you to view the data members of the object associated with the current method
Ctrl-Alt-H
Displays the Threads window to view all of the threads for the current process
F9
Sets or removes a breakpoint at the current line
Ctrl-F11
Displays the disassembly information for the current source file. Available only in break mode
Ctrl-Alt-W, 1
Displays the Watch 1 window to view the values of variables or watch expressions
Ctrl-Alt-W, 2
Displays the Watch 2 window
Ctrl-Alt-W, 3
Displays the Watch 3 window
Ctrl-Alt-W, 4
Displays the Watch 4 window
Ctrl-Alt-P
Displays the Processes dialog, which allows you to attach or detach the debugger to one or more running processes


return to top


Object browser
Shortcut Description
Alt-F12
Displays the Find Symbol dialog
Ctrl-F12
Displays the declaration of the selected symbol in the code
F12
Displays the definition for the selected symbol in code
Ctrl-Alt-F12
Displays the Find Symbol Results window
Ctrl-Alt-J
Displays the Object Browser to view the classes, properties, methods, events, and constants defined either in your project or by components and type libraries referenced by your project
Alt-+
Moves back to the previously selected object in the selection history of the object browser
Shift-Alt-+
Moves forward to the next object in the selection history of the object browser


Tool window
Shortcut Description
Ctrl-Shift-M
Toggles the Command window into or out of a mode allowing text within the window to be selected
Ctrl-Shift-C
Displays the Class View window
Ctrl-Alt-A
Displays the Command window, which allows you to type commands that manipulate the IDE
Ctrl-Alt-T
Displays the Document Outline window to view the flat or hierarchical outline of the current document
Ctrl-Alt-F
Displays the Favorites window, which lists shortcuts to web pages
Ctrl-Alt-O
Displays the Output window to view status messages at runtime
F4
Displays the Properties window, which lists the design-time properties and events for the currently selected item
Shift-F4
Displays the property pages for the item currently selected. (For example, use this to show a project's settings.)
Ctrl-Shift-E
Displays the Resource View window
Ctrl-Alt-S
Displays the Server Explorer window, which allows you to view and manipulate database servers, event logs, message queues, web services, and many other operating system services
Ctrl-Alt-R
Displays the web browser window, which allows you to view pages on the Internet
Ctrl-Alt-L
Displays the Solution Explorer, which lists the projects and files in the current solution
Ctrl-Alt-K
Displays the TaskList window, which displays tasks, comments, shortcuts, warnings, and error messages
Ctrl-Alt-X
Displays the Toolbox, which contains controls and other items that can be dragged into editor and designer windows


Html editor (Design View)
Shortcut Description
Ctrl-B
Toggles the selected text between bold and normal
Ctrl-Shift-T
Decreases the selected paragraph by one indent unit
Ctrl-T
Indents the selected paragraph by one indent unit
Ctrl-I
Toggles the selected text between italic and normal
Ctrl-Shift-K
Prevents an absolutely positioned element from being inadvertently moved. If the element is already locked, this unlocks it
Ctrl-G
Toggles the grid
Ctrl-Shift-G
Specifies that elements be aligned using an invisible grid. You can set grid spacing on the Design pane of HTML designer options in the Options dialog, and the grid will be changed the next time you open a document
Ctrl-U
Toggles the selected text between underlined and normal
Ctrl-Shift-L
Displays the Bookmark dialog
Ctrl-J
Inserts
in the current HTML document
Ctrl-L
When text is selected, displays the Hyperlink dialog
Ctrl-Shift-W
Displays the Insert Image dialog
Ctrl-Alt-Up Arrow
Adds one row above the current row in the table
Ctrl-Alt-Down Arrow
Adds one row below the current row in the table
Ctrl-Alt-Left Arrow
Adds one column to the left of the current column in the table
Ctrl-Alt-Right Arrow
Adds one column to the right of the current column in the table
Ctrl-Shift-Q
Toggles display of marker icons for HTML elements that do not have a visual representation, such as comments, scripts, and anchors for absolutely positioned elements
Ctrl-Page Down
Switches from design view to HTML view and vice versa
Ctrl-Q
Displays a 1-pixel border around HTML elements that support a BORDER attribute and have it set to zero, such as tables, table cells, and divisions


Macro
Shortcut Description
Alt-F8
Displays the Macro Explorer window, which lists all available macros
Alt-F11
Launches the macros IDE
Ctrl-Shift-R
Places the environment in macro record mode or completes recording if already in record mode
Ctrl-Shift-P
Plays back a recorded macro

Monday, February 13, 2012

Distribution Groups or Lists are not showing up in people picker

Change the ‘Group Type’ of the list from ‘distribution’ to ‘security’ in the AD group properties. This should solve the problem.

Monday, February 6, 2012

DateTime formatting in C#

DateTime thisDate1 = new DateTime(2011, 6, 10);
Console.WriteLine("Today is " + thisDate1.ToString("MMMM dd, yyyy") + ".");

DateTimeOffset thisDate2 = new DateTimeOffset(2011, 6, 10, 15, 24, 16,
TimeSpan.Zero);
Console.WriteLine("The current date and time: {0:MM/dd/yy H:mm:ss zzz}",
thisDate2);
// The example displays the following output:
// Today is June 10, 2011.
// The current date and time: 06/10/11 15:24:16 +00:00

Merge SharePoint logs based on Correlation ID using powershell

PS D:\logs> Merge-SPLogFile -Correlation xxxxx-xxx-xxx-xxx-xxxxx -path d:\logs\error.txt

Sunday, January 29, 2012

Shutdown Virtual Machine without changes in VM Player

Edit the vmx and add this line if the VM uses a scsi-disk

scsi0:0.mode = "independent-nonpersistent"

or this if the VM uses an IDE-disk

ide0:0.mode = "independent-nonpersistent"

Friday, January 27, 2012

Extract WSP through C# or Powershell.

C# code extract WSP file:

SPSolutionCollection solutions = SPFarm.Local.Solutions;

foreach (SPSolution solution in solutions)
{
SPPersistedFile wspFile = solution.SolutionFile;
wspFile.SaveAs("c:\\wsp\\" + solution.Name);
}

Powershell script:
Start-Transcript "c:\wsp\transcript.txt"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$solutions = [Microsoft.SharePoint.Administration.SPFarm]::Local.Solutions;
foreach ($solution in $solutions) {
$solution.SolutionFile.SaveAs("c:\wsp\" + $solution.Name);
}
Stop-Transcript

MOSS 2007 versions information

12.0.0.6535 MOSS 20071 or WSS 3.0 SP2 + December 09 cumulative Update (KB960010 + KB960011)

12.0.0.6524 MOSS 20071 or WSS 3.0 SP2 + 15th December Update (KB977027 + KB977026)

12.0.0.6520 MOSS 20071 or WSS 3.0 SP2 + October 09 cumulative Update (KB974989 + KB974988)

12.0.0.6514 MOSS 20071 or WSS 3.0 SP2 + August 09 cumulative Update (KB973400 + KB973399)

12.0.0.6510 MOSS 20071 or WSS 3.0 SP2 + June 09 cumulative Update (KB971538 + KB971537)

12.0.0.6504 MOSS 20071 or WSS 3.0 SP2 + April 09 cumulative Update (KB968850 + KB968851)

12.0.0.6421 MOSS 20071 or WSS 3.0 SP2 (KB953338 + KB953334) [Updated 1st Aug 09: SP2 download now includes the hotfix (KB971620) that corrects the activation issue more information on the Microsoft SharePoint team blog]

12.0.0.6341 MOSS 20071 or WSS 3.0 February 09 cumulative Update (KB961755 + KB961756)

12.0.0.6335 MOSS 20071 or WSS 3.0 December 08 cumulative Update (KB960010 + KB960011)

12.0.0.6331 MOSS 20071 or WSS 3.0 October 08 cumulative Update (KB957691 + KB957693,KB958567 and KB958569)

12.0.0.6327 MOSS 20071 or WSS 3.0 August 08 cumulative update (KB956056 & KB956057)

12.0.0.6318 MOSS 20071 or WSS 3.0 Infrastructure Update (KB951695 & KB951297)

12.0.0.6303 MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB948945)

12.0.0.6301 MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB941274)

12.0.0.6300 MOSS 20071 or WSS 3.0 post-SP1 hotfix (KB941422)

12.0.0.6219 MOSS 20071 or WSS 3.0 SP1

12.0.0.6039 MOSS 20071 or WSS 3.0 October public update

12.0.0.6036 MOSS 20071 or WSS 3.0 August 24, 07 hotfix package

12.0.0.4518 MOSS 20071 or WSS 3.0 RTM

12.0.0.4407 MOSS 20071 or WSS 3.0 Beta 2 TR

12.0.0.4017 MOSS 20071 or WSS 3.0 Beta 2

12.0.0.3111 Office 12 (PDC image - pre-beta) - This version of Office does not have a support link in the Add/Remove programs dialog box.

Top 10 SharePoint Tools from CodePlex

Useful Tools for SharePoint from CodePlex

SharePoint Content Deployment Wizard by Chris O’Brien
This is a great tool for quickly deploying SharePoint content from one environment to another. Here are some salient feature of this tool:

Ability to “cherry-pick” content to deploy using a tree view - this is from entire site collection down to individual lists, folders, list items (including files)
Dependencies of selected content (e.g. referenced CSS files, master pages) are automatically included in the export - check ‘Exclude dependencies of selected objects’ to disable this.
All required content types, columns etc. are automatically included in the export.
In contrast to STSADM export, it is possible to retain GUIDs during deployment. This is required for scenarios where the destination should be a mirror-image of the source, such as staging/production environments for the same site
Open Source and free.
Read the detailed review of this tool

Download from CodePlex
http://www.codeplex.com/SPDeploymentWizard

Chris Obrien’s Blog
http://www.sharepointnutsandbolts.com/2007/12/introducing-sharepoint-content.html

SharePoint SmartTemplates for Visual Studio
The SmartTemplates for SharePoint project delivers a collection of Visual Studio templates which allow developers to create a range of SharePoint customizations in a painless and professional fashion.

SmartTemplate comes in 2 flavors:

Web Part Project Template:
It allows developers to create quickly a project which contains the base infrastructure to write the web part code, generate a SharePoint Solution file (WSP) for easy deployment and generate a setup package for a wizard driven installation.

SmartPart Web Part Project
Allows developers to create quickly a project which contains the base infrastructure to write a web user control (ASCX), wrap the user control in a SmartPart instance, generate a SharePoint Solution file (WSP) for easy deployment and generate a setup package for a wizard driven installation.

Download from CodePlex
http://www.codeplex.com/smarttemplates

SharePoint 2007 Features
SharePoint 2007 Features add new functionality to a SharePoint 2007 farm, site collection, or site. It install bunch of custom Features to address deficiencies in SharePoint 2007 or add new capabilities.

Some of the popular feature are Debugger Feature, Log Viewer, Print List, Toolbar Manager etc.

Download from CodePlex
http://www.codeplex.com/features

SPIEFolder
Allows you to either Import a file system folder (And all files and subfolders) into a SharePoint Document Library, and also export a SharePoint Document Library to the file system for WSS 2.0/SPS2003 or WSS 3.0/MOSS 2007.

This tool completely replicates the document libraries folder hierarchy to the file system when exporting, and replicates the folder hierarchy from the file system to the document library when importing.

Download from CodePlex
http://www.codeplex.com/SPIEFolder

SPSiteManager
The purpose of the SharePoint Site Manager (SPSiteManager) is to assist customers with performing SharePoint Site Collection maintenance activities for SharePoint Products and Technologies (which includes Windows SharePoint Services 2.0 and SharePoint Portal Server 2003). This sample source can be compiled to produce a tool that will allow you to analyze your farm looking for problems, repartition/level sites across content databases, perform batch backups, restores, and deletes of site collections, and perform Site maintenance and cleanup for SharePoint Portal Server.

Download from CodePlex
http://www.codeplex.com/SPSiteManager

SPPurgeList
Allows you to purge the contents from any list or document library on WSS 2.0/SPS2003 or WSS 3.0/MOSS 2007.

If you need to retain a list/document library itself (Maintaining its original GUID) without completely deleting the entire list/document library and re-creating, this tool can help.
You could certainly use Web Folders (WebDAV) to clear the contents, but users stand the chance of accidentally deleting the contents of the forms folder which is not desirable. As well, you could script and automate the task using this tool if you desired.

Download from CodePlex
http://www.codeplex.com/sppurgelist

SPLSBackup
The purpose of SPLSBackup is to mimic STSADM site collection level backup/restore but with options for setting/unsetting the sites lock state during the operation, therefore eliminating the need to manually visit the SharePoint Central Admin pages before and after.

Download from CodePlex
http://www.codeplex.com/splsbackup

SharePoint Access Checker Web Part
Quickly check what objects within a SharePoint site hierarchy a user has access to.

The Access Checker Web Part is a Windows SharePoint Services Web Part, for use within Windows SharePoint Services v3 and Microsoft Office SharePoint Server 2007, that displays a tree view showing permissions on objects for a user scoped to a Site hierarchy. It also has a second mode which will show the permission inheritance of objects within a Site hierarchy.

Download from CodePlex
http://www.codeplex.com/AccessChecker

WSPBuilder
The WSPbuilder is a console application that creates SharePoint Solutions files based on a folder structure. WSPBuilder will automatically traverse a “12″ folder structure and creates a SharePoint solution manifest.xml and the wsp file based on the files it finds.

Therefore you do not need the knowledge of how to create a solution manifest.xml and wsp file any more.

Download from CodePlex
http://www.codeplex.com/wspbuilder

SharePoint Used Space Information
SharePoint Used Space Information is a console application which allows to retrieve information about space used (bytes) by all sites and sub-sites for a specific site collection into .csv files.

Download from CodePlex
http://www.codeplex.com/SPUsedSpaceInfo

If you have used any of these tools, please drop a comment and share your views.

You might be interested in:
SharePoint 2007 Test Data Population Tool
SHAREPOINT DESIGNER 2007 IS NOW FREE!
Review of: SharePoint Content Deployment Wizard
Using STSADM.EXE to Create Empty Site Collection
Set the SharePoint Welcome Page through code

Install WSPs using STSADM- Sample batch file

set WSP_NAME=###WSPNAME##.wsp
cd E:\Builds\PreBuild

stsadm -o retractsolution -name %WSP_NAME% -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name %WSP_NAME% -override
stsadm -o execadmsvcjobs
stsadm -o addsolution -filename %WSP_NAME%
stsadm -o execadmsvcjobs
stsadm -o deploysolution -name %WSP_NAME% -immediate -url ###URL### -allowgacdeployment -force
stsadm -o execadmsvcjobs



pause

A tool to extract WSP solutions from SharePoint to hard disk

http://archive.msdn.microsoft.com/SPSolutionExtractor


Resource Page Description
This tool allows to verify all wsp files installed on SharePoint 2007 Farm. And it allows to download the wsp files from SharePoint Database to hard disk.

Usage:

SharePointFarmSolutionExtractor.exe -list
(This command list all WSP-Solution installed on the SharePoint Farm)


SharePointFarmSolutionExtractor.exe -extractAll c:\SharePointSolutions
(This command download all WSP-Solutions installed on the SharePoint Farm to the specified path)


SharePointFarmSolutionExtractor.exe -extractById c:\SharePointSolutions
(This command will download all WSP-Solution with matching the SolutionGUID to the secified path)

SharePointFarmSolutionExtractor.exe -extractByName
c:\SharePointSolutions
(This command will download all WSP-Solution with matching the SolutionName to the secified path)

Requirements:
- .NET 2.0
- Microsoft.SharePoint.dll