Tuesday, January 4, 2011

Porting Sharepoint 2007 document library STP to SharePoint 2010

Recently read a post from Tom Belgium which speaks about porting SharePoint 2007 list templates to SharePoint 2010 and it worked just by replacing the product version and and repackage with makecab utility.

I faced a scenario to port a document library STP template including some documents.SharePoint packages the documents of the document library and manifest.xml as a single package.

Following are the steps to modify the STP file.
Rename the STP File to a CAB file and have a look at the contents
Create a new folder in c: drive say c:\Templates\, drag and drop all the contents from the cab file
Edit the Product version tag in Manifest.xml and save the file
Open a command prompt, navigate to the folder where we copied contents from CAB file and take the list of files in a txt/ddf file. Store this file within C:\Templates folder

Prepare the DDF file with the list of obtained file names, don't forget to give the cabinet file name in DDF file
Download the sample DDF file here


Execute Makecab utility to generate the CAB archive, you will see a C:\templates\Package folder and within that folder the STP will be available

This is the new STP file which will work in SharePoint 2010 edition.

Friday, December 24, 2010

Rename a SharePoint 2010 standalone server

To rename a SharePoint 2010 server MSFT recommends using the power shell cmdlet with a brief article. Unfortunately in my case the power shell throws an "object reference" exception which pushed me to explore my good old friend STSADM in 14 hive.

Rename the SharePoint 2010 server using STSADM

stsadm.exe -o renameserver  -oldservername -newservername

Rename the Windows Server 2008 R2

Computer->Properties->Change Settings->Change-> Provide the new Server name and restart the machine

Update Farm credentials using STSADM
stsadm.exe -o updatefarmcredentials  -identitytype configurableid  -userlogin          -password

 Update AAM settings for Central Administration
  • Open central administration, select Application Management in the left pane
  • Select configure Alternate access mappings under Web applications setting
  • Filter the view by "Central Administration" and modify the internal Url to reflect the new Server Name.
If you have created any other web applications then modify the alternate access mapping settings for those URL's

Do an IISRESET and good to go.

Monday, December 6, 2010

Android Cupcake on Oracle Virtual Box

As we are hearing a lot of noise from Android development just though about checking out the virtualization options of an Android OS. Although it got an emulator to test the code piece, I'm not a Android developer at least now and wanted to have a simple hands on . As its a Linux kernel in its core, I believed it should be able run in a virtualized environment.

Then came across this project name Live Android., they are providing the ISO images which runs on Oracle Virtual Box but the image is Android 1.5 Cup cake, a very old version of Android. Need to check the successor of this project Android-X86 who is promising for Froyo.

Cupcake running in my Virtual Box with 256 megs RAM 


No mouse support provided within, all manipulations through keyboard only
There's a lot happening in open source world...

Sunday, November 28, 2010

EnableViewState on ASP.NET Text box

While I was helping one of my friend this weekend in getting up to speed in ASP.NET basics, I was trying to demo View state by example and added couple of text boxes and a button control to showcase the stateless behavior of web and how view state helps(brings performance problems most of the times) developers to retain the values between post back.

But the sample app retains value between post back even after disabling the view state in control level and as well as in Page level. Puzzled a bit and tried to reproduce the same scenario with other controls such as check box and a calendar control. To make it worse for Calendar control the view state works as expected and for check box control, it maintains the state even though the view state is disabled.

After couple of minutes searched in Microsoft Knowledge base found this knowledge base article KB316813 which solves the puzzle stating that the following set of controls will persist value across requests even though the view state is disabled.


  • The TextBox control.
  • The CheckBox control.
  • The RadioButton control.

The values which are posted to the server are handled by the IPostBackDataHandler interface.

Wednesday, November 24, 2010

Benchmarking the browser speed again

I did the browser speed test for all my browsers using SunSpider JavaScript way back in 2008 . When I installed IE 9 beta and after hearing all the "Beautiful web" marketing fundas from Microsoft, I was tempted to run the SunSpider script on IE 9 beta and other available counter parts.


Browser name
SunSpider(ms)
V8(ms)
Firefox 4.0b7
1416
583
Safari 5.0.2
1565
474
IE  9.0.7904
2143
337
Opera 10.63
1660
534
Chrome 8.0 beta
1984
1305
Firefox 3.6.10
3571
64.1


All tests were executed on Intel Dual core P8600 2.40 Ghz processor with 4 GB RAM in place.Results of Sun spider JavaScript in graph format below. Shorter is good.

There are also other alternatives available for benchmarking the abilities of a browser Google V8 benchmark suite and Mozilla Kraken. As Mozilla Kraken is based on Sun Spider and too young let us not consider for this benchmark.

Results of browsers on Google V8 benchmark suite v6 is (longer is good)
As Google considers its V8 benchmark suite v6 for its tuning purpose, it outperforms others pretty good.

Firefox 4.0 beta powered by Jager Monkey performs better than its predecessor Trace monkey(Firefox 3.6), Apple Safari's Nitro engine, Opera's Carakan & IE 9's the new Chakra engine.

Even though there is no significant change in Chrome's V8 engine, it still gives tough to other contenders. The most notable point is the Microsoft's transition  from Internet Explorer 8 to 9. MSFT changed the JavaScript engine, compatible with HTML 5, slick tear of tabs(like chrome), new tab page and new download manager(like Mozilla).

way to go Microsoft, but miles to go...

Thursday, November 18, 2010

SharePoint on Cloud from Microsoft Online Services

SharePoint Online is a cloud-based service for businesses. In SharePoint setting up a web farm and get it up running form small enterprise was always a challenge in terms of hardware cost, getting the expertise to set up the web farm, capacity planning etc.

Now Microsoft wants to bring SharePoint to the masses by exposing it in the cloud thus it takes care of the infrastructure, scalability of the web farm, maintenance & patching the systems with less or no downtime and calculation of volume licensing(ever did or try to find the licensing math) with as low as 10$.

Reach out to SharePoint Online for small business which provides information related to the small enterprises. Developers can reach out to Developer resource center for understanding developer features available. I believe there should not be major change Developer resource centers with the API for development.

Finally SharePoint also joins the Cloud band. hmm.. result of significant innovation and development in virtualization arena.

Friday, October 22, 2010

Fetching from SharePoint Lists using ACE OLE DB

There are varieties of ways available to access a sharepoint list object model, web services, RPC, DAV. Recently gotta chance to work with Microsoft ACE OLE Db objects, while playing with the object came across a strange connection string from Connectionstrings.com which just provides a connection string for a sharepoint list.

This approach is not officially documented anywhere, I thought of giving it a shot and its working too. Here's the code to display values fetched from SharePoint list using OLE DB data reader.



string connString = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes; DATABASE=http://foo/;LIST={7F72D985-5219-4E8A-AA56-C4473902A333};";
OleDbConnection conn = new OleDbConnection(connString);
            conn.Open();
OleDbCommand command = new OleDbCommand("select * from States", conn);
            OleDbDataReader dataReader = command.ExecuteReader();
            while (dataReader.Read())
            {
               Console.WriteLine(dataReader["Title"]);
             }



This approach is strictly for development environment ONLY.