Monday, July 20, 2015

Visual Studio 2015 and .NET 4.6 Available for Download

Few minutes back Microsoft announced the release of Visual Studio 2015 and .Net 4.6.

Microsoft has added tremendous amount of new features in to the new version of VS. According to "Soma" Somasegar, Microsoft’s corporate VP of its Developer Division, “When you think about Visual Studio, the core theme is that VS 2015 is a cross-platform tool set". I'm so existed to test the product, specially the cross platform features.

Soma's blog on VS 2015.

You can see the Visual Studio release note from  here.

Tuesday, July 7, 2015

Deleting a Site Collection Forcefully

Before writing about the solution, let me brief the problem. I was working for one my clients, suddenly I got an error message inside the PowerShell window. I was trying to move a Site Collection using the Move-SPSite cmdlet to a new content database. "A transport-level error has occurred when receiving results from the server" was the error. This is not what I'm going to talk about as I'm still trying to rectify the cause for the same.

Just after the above error, the existing site collection stopped working. Once I select the Site Collection in the "View All Site Collections" in central admin, on the right side of the screen, all I saw was a empty values about the site collection. Even it was without a Content Database. My plan was to delete the site collection and restore the backup. But deleting failed due to the unavailability of the database. Even the Remove-Spsite cmdlet couldn't help me as it can only delete a full provisioned Site Collection. But the below approach worked well.

$siteUrl = “http://mydomain/Site“
$site = get-spsite $siteUrl
$siteId = $site.Id
$siteDatabase = $site.ContentDatabase
$siteDatabase.ForceDeleteSite($siteId, $false, $false)

Thanks to Peter.