Friday, November 12, 2010

Unable to cast object of type 'Microsoft.SharePoint.Administration.SPWebApplication' to type 'Microsoft.SharePoint.SPSite

Today I have found error "Unable to cast object of type Microsoft.SharePoint.Administration.SPWebApplication' to type 'Microsoft.SharePoint.SPSite" during deploy moss 2010 solution.

I have set scope as "Site" and due to that above issue is occured.
I have changed scope as "WebApplication" and rebuild it and after deploy it.
So Its working Fine and solution is deployed successfully.

Cheers.