Wednesday, April 28, 2010

Global Assembly Cache goes empty


While doing the development on a SharePoint machine, it is frequent to deploy the dlls in GAC and resetting the IIS or recycling the application pool. one day the GAC goes empty and all of us sudden we are not able to deploy the library to the GAC. It had a solution of restarting the development machine but this issue is frequent among the team members


Solution for this is to navigate to Start-> Run - >services.msc and find "Indexing services" stop/restart the service and reopen the assembly window. There you go . .. .

Fix : Location.href not working in IE 6

We recently tried to do a post back of a page based on a user input in a text box, the postback will be triggered by a ASP LinkButton. ASP Linkbutton renders as an anchor tag with the href populated with javascript:WebForm_DoPostBackWithOptions. So the challenge is to set the window.location to the javascript:WebForm_DoPostBackWithOptions

window.location= javascript:WebForm_DoPostBackWithOptions .. . ..

The location can be a URL too, in our case it is just a post back script

It works like a charm in IE 8 but it doesn't even show a sign in IE 6. We tried many variations window.location=, window.location.href= ,window.location.href.assign but nothing worked out.

After few hours of googling and surfing the web we found that we need to add the following line to get it worked in IE 6

window.event.returnValue=false;

At last the final code looked like this

if (evt.keyCode == 13)
{
window.event.returnValue = false;
window.location = 'http://www.google.com";
return false;
}

hope this helps someone .. .

Tuesday, April 20, 2010

Silverlight on Symbian platform

While Adobe is still struggling to get it Flash to iPhone platform, Microsoft released silverlight for Symbian platform. this will enable Nokia S60 5th edition to display silverlight content. As Microsoft already enable Silverlight in its mobile operating system now it is extending the technology to another open source smart phone platform.

check out the Nokia beta labs here

Sunday, March 28, 2010

Why Fx Cop recommends String.ToUpperInvariant for normalizing ?

I used to normalize strings using lower case from Visual Basic 5.0 era before a string comparison activity. While executing Microsoft FX Cop on a recent SharePoint project, FX Cop rule #CA1308 stumbled upon on many places and recommending to convert to upper case invariant for normalizing.

As usual Microsoft doesn't have proper documentation and I'm just looking for what's the difference between ToLowerInvariant & ToUpperInvariant in terms of performance. Michael Kaplan's blog reveals the difference.

All Microsoft NTFS filesystems follow the normalizing to upper case, so the framework developers just followed the NTFS standards. The NTFS filesystem contains a metafile named $UpCase which is a table of unicode uppercase characters for ensuring case insensitivity in Win32 and DOS namespaces. This $UpCase file contains the upper case conversion table for NTFS file systems.

Now the question is why NTFS is following upper case conversion standards, there are some language scripts which doesn't have lower case letters. So for these scripts if we apply the lower casing logic this will also produce the upper case letters producing a round trip. To avoid this Microsoft seems to follow this upper case standards

Tuesday, March 16, 2010

Stumbled upon "Assembly fabrikam could not be uninstalled because it is required by other applications"

Ever struck with this nasty error message from GAC while uninstalling a library




Actually we were experimenting MSI installers to deploy some of our prerequisite libraries to global assembly cache to save some time on preparing the deployment scrips. I've been using these dlls which were deployed using installers in my dev environment. When I tried to uninstall these libraries, I was beating the bush around with this error message.

It leads to learning of traced reference count on assemblies here. The quick fix is to open the registry, navigate to the following hierarchies and remove your assembly entries

[HKCU\Software\Microsoft\Installer\Assemblies\Global]

[HKLM\SOFTWARE\Classes\Installer\Assemblies\Global]

Lessons learnt : Don't try MSI installers on an environment where you do a very frequent patch releases (of course in Dev Environment too). Stick to the basic Gacutil tool

Friday, December 4, 2009

Fixing UserProfileException while installing SharePoint Server 2010


  1. Microsoft.Office.Server.UserProfiles.UserProfileException

    The request channel timed out while waiting for a reply after 00:00:18.7285970.
    Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding.

    One of the clear exception which says what to do while installing the beta product

    Navigate to the following path and open the client.config file \14\WebClients\Profile\client.config

  2. Find the tag increase the default sendTiemout attribute value to few minutes instead of seconds sendTimeout="00:15:20"

  3. Rerun the Psconfig wizard

After a long struggle managed to deploy SharePoint 2010 in a Vmware dev environment



Wednesday, December 2, 2009

VirtualBox memory limitation plays spoilsport in Sharepoint 2010 installation

As a believer of virtualized development environment, I've started building the development environment for SharePoint 2010 using Sun Virtualbox. I've shared initially 1 GB of Ram out of 4 GB from my 32 Bit Vista host which eventually fell short after installing the Pre-requisites of SharePoint 2010

After facing a lot of screen freezes and high memory consumption in my guest (Windows Server 2008 SP1) I've increased the shared memory to 1.50 GB. SharePoint 2010's psconfig proved that is too low after 8 of 10th step throwing a WCF timeout exception. No luck even after relaxing the timeout values ,not able to complete psconfig and not able to pull down the processor/memory consumption

Frozen VirtualBox



So SharePoint 2010 requires more memory to be shared in its virtualized environment, there comes the issue. There's no way to increase the shared memory beyond 1500 MB with my current hardware setup(32 bit Vista Home premium with 4 GB RAM)

This limitation is forcing me to evaluate using VMware, so for the time being good bye for the cross platform hypervisor Virtualbox

Top memory comparison with VMWare