Sunday, November 22, 2009

How to increase the size of vmware hard disk (.vmdk)

I was preparing 64-bit VM for my (SharePoint 2010 beta) development environment using VMWare, with the capacity of hard disk 20GB. But in order to install everything required for SharePoint 2010 beta 20GB was not sufficient, so I planned to increase the size of hard disk. I thought it would be very easy to increase the size of hard disk through management web console of VMWare but I could not find any option to increase the size of hard disk. After searching on the internet I found following some blogs/articles on same issue but nothing could work for me as it is mentioned in following links:

http://www.novell.com/coolsolutions/tip/15344/html
http://consultingblogs.emc.com/kalpeshprajapati/archive/2007/07/24/How-to-Extend-virtual-Hard-Disk-_2008_-WMWARE_2900_.aspx

When I ran command:
c:\program files\VMWare\VMWare Server>vmware-vdiskmanager.exe -x 30Gb "filepath\filename.vmdk"

I got error:
FILE: FileIO_Lock on 'filepath\filename.vmdk' failed:Lock timed out
Failed to open the disk 'filepath\filename.vmdk': The file is already in use (0x400800000000f).

So in order to increase the size of vmware hard disk, I have performed following steps

1- Make sure VM is stop
2- Remove the hard disk from VM
3- Increase the size of hard disk using aforementioned command
4- Attach the existing hard disk with VM
5- Turn on the VM
6- VM was up and running successfully with extended size 40 Gb of hard disk
7- Turned on the VM
8- Go to command prompt and type diskpart
9- then type list disk
10- then type list volume, which shows all the drives with volume numbers and other information. In order to increase the size of respective disk, volume is required to be selected
11- Type select volume=
12- After selecting the volume, type extend
13- Done

Hoping this will help someone else time while increase the size of VMWare hard disk.

Following are the steps which I followed in order to increase the size of hard disk

Monday, November 16, 2009

SharePoint Designer Workflow and InfoPath

While working on SharePoint Designer Workflow, I came across the following challenges:

Assign approver dynamically

I was developing a SharePoint Designer Workflow, in which approver of the Workflow was selected dynamically while reading from a field (exposed from InfoPath Form - People Picker) of SharePoint List, the problem I was facing that field was returning nothing to me even InfoPath Form had contained data in it.
After digging more into this, I figured it out SharePoint Designer Workflow was not able to fetch the value from the field in Step-1 (SharePoint Designer Workflow works in steps and within each step activities can be performed based on the conditions, if any), so when I moved the logic to assign the approver on the fly in step-2, it started working.

Set Infopath form field within the workflow

Another challenge I faced while working on SharePoint Designer Workflow to set the value of InfoPath field within the workflow. As there is no OOTB activity which allows setting the Infopath form field but after researching a bit I found a utility on the CodePlex (SharePoint Open Source Community), which adds new activities in SharePoint Designer Workflow related to Infopath and one of the activity is used to set the value of InfoPath field. In order to read more, use this link Useful Sharepoint Designer Custom Workflow Activities

Thursday, September 17, 2009

Custom Content Type, Visible on New Button

I was adding a custom content type to a form library and I was using the same code mentioned in the following link:
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/13333670-d1ea-41ec-8ebc-4ad9ecb04927

But my custom content type was not set as "Visible on New Button", after that I created a new form library and tried to run the same code which I was using before and it worked for newly created form library.

I started comparing the difference between 2 form libraries because same code was working for one form library but not working for other one, after digging into further I realized whenever you change the order of content type through UI while using the "Change new button order and default content type" option under the settings of form library, code does not work.

So consequently I can say in order to code get working don't change the form library content type order through UI, there can be any other reason for which code was not working but I could find only this reason, it may help someone in future.

Wednesday, September 9, 2009

Top Row / Custom Heading in CQWP

If you are wondering how to add a custom heading or image as a heading of CQWP or custom top row in your CQWP then don't worry, this is something very simple and easy to accomplish.

Open ItemStyle.xslt in SharePoint Designer and write down the following code withing your template



As you can see above mentioned code will put myImage.gif at the top of CQWP detail, which appears as heading of CQWP.

I hope this will save someone time in future.

Thursday, August 20, 2009

Report Viewer Webpart Error

While establishing a Report Viewer webpart connection with Report Explorer webpart, I was getting following error:

System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.


After digging into this error I figured out that sharepoint site is running under application pool using "Network Service" account.

In order to resolve aforementioned issue, I did the following things

1- Go to Central Admin --> Operations
2- Click "Service Accounts" under (Security Configuration) and do the following

After specifying domain account credentials it solved the issue.

Hoping this will save someone time in future.

Wednesday, August 5, 2009

FBA Users, Open Files in Client's Program/Tools

I have an (extended web application from default web application using windows authentication) internet facing site using FBA and experiencing a weird issue when trying to open (uploaded word and excel documents or video files or any other file which needs client program to show/run/display) it does not work.

Following are the different behaviour for different files

Word Document: Microsoft Word Application run but does not display any document
Excel Document:
.WMV File:

After searching on the internet I found the following forum which helped me:

Assume your client is a vista machine. If you run your IE in protected mode (normally it is), then you need to add your server as trusted location. Otherwise you need to run your IE in administrative mode. (right click "run as administrator")
Then when you login in IE you need to check "Sign me in automatically", which will persist your credential.


http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/0811935c-c69a-4eb4-b319-63cc139ac727

In order to enforce (to enable the "Sign me in automatically" option), I updated login.aspx: select "Sign me in automatically" option by default and hide that option so that user no need to select that option.

Hope this will save time for someone.

Monday, July 27, 2009

Adding Active Directory Users in WSS 3.0 Site using FBA

I was running into an issue while adding Active Directory users into WSS site configured as FBA. I was getting following error:

"No Exact Match found".

After digging into this issue and searching on the internet, I came across the following forum, which is talking about exactly the same issue:

http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/c2da032b-2346-4068-8936-6dbf4411eac1

I double checked and realized that site is running under application pool identity (user which was not a domain user, user was pointing to local group because site was running on the server which was not part of domain controller before and it had been added to domain controller later on).

So after performing the following operations I could able to add active directory users in wss site which is configured as FBA:

1- Give the permission on the content database to domain\user
2- Go to Central Admin --> Operations --> Service Accounts
3- Select Windows Service from the dropdown
4- Select Windows SharePoint Services Web Application (under web service)
5- Select Application Pool Account
6- Enter the domain\user and password

Note:- If you will change application pool identity from IIS manager only it will not work properly so you have to change it through Central Admin as mentioned above.

Hoping this will help someone !!!

Saturday, July 25, 2009

BDC Association Error

I was doing association between 2 entities using business data catalog (BDC) in SharePoint but while importing meta-date file I was getting the following error:

Application definition import failed. The following error occurred: The IdentifierName Attribute of the TypeDescriptor named 'columnName' of the Parameter named 'returnParameter' of the Method named 'methodName' of the Entity named 'entityName' does not match any of the defined Identifiers for the Entity. Error was encountered at or just before Line: '157' and Position: '24'.


Another error which I was getting on the page sometimes as follow:

The Business Data Catalog is configured incorrectly. Administrators, see the server log for more information.

That error is found within the Servers Event Log:

A Metadata Exception was constructed in App Domain '/LM/W3SVC/1959965621/Root-2-128667808042048704'. The full exception text is: Could not find appropriate places on the root TypeDescriptor to read sub-identifier values for the Instance of Entity 'entityName'.

After digging into the error I found that
while doing the association between 2 entities, identifier which is used in order to call the method in one entity, same identifier should also be present in other entity, otherwise association will never be successful and user will keep on facing aforementioned errors.

Note:- While performing the association between two entities, database schema should support the BDC association model and all the identifiers should be defined properly in all entities.

I am hoping that this will save time of someone in future.

Friday, July 24, 2009

Creating Site Collection from STP Template

I manally configured a site, saved that site as a template and was wondering that how can I create a site collection from that template.

For a moment I thought, it might not possible to create a site collection from the stp template then I realized there must be something or workaround to create the site collection from stp template.

After looking at the stsadm operations command I found the following command:
stsadm -o addtemplate -filename -title <title> [-description] <description>

When I tried above command to add my stp template, it did the magic for me. I was able to find my stp tempalte (while creating my site collection) under Custom tab with the same title as I provided in above command.

I hope this might be helpful for someone who is exactly looking for this kind of thing.

Thursday, July 23, 2009

FBA Management in SharePoint

I was wondering how to manage FBA users in for WSS 3.0 /MOSS 2007 site and after looking at CodePlex, I could find following utitlity which does the magic in order to manage users for FBA.
http://fba.codeplex.com/

In order to get it working properly, make sure you have read all the "Issue Tracker" topics.