Archive for October, 2012

How To: Click Once application with SharePoint 2010

October 11, 2012 Leave a comment

Guys !!

Today, one of my friend was looking for the solution, where he can open Desktop application (Client side) from SharePoint site using browser.

It seems interesting for me as i did not work before. I got solution on internet which is really useful.

Using Click Once Application(also known as Smart Client application), we can achieve same.

Ingo has given very nice article, how we can create click once application with SharePoint 2010.

Click here to see his article.

Happy Coding !!!

Start Application Pool automatically from IIS using PowerShell

October 4, 2012 Leave a comment


From last some days, we were facing some issue where our server automatically stop some application pool from IIS when something deploy on server.

We need to start it manually from IIS. but we need to fix it.

And my colleague(Jay Mehta) gave us very good solution with PowerShell script.


Import-Module WebAdministration
cd IIS:/AppPools
$ApplicationPools = dir
foreach ($item in $ApplicationPools)
    $ApplicationPoolName = $item.Name
    $ApplicationPoolStatus = Get-WebAppPoolState $ApplicationPoolName
    if($ApplicationPoolStatus.Value -eq "Stopped")
         #Write-Host $ApplicationPoolName --> $ApplicationPoolStatus.Value
         Write-Host $ApplicationPoolName "found stopped."
         Start-WebAppPool -Name $ApplicationPoolName
         Write-Host $ApplicationPoolName "started."

This scripts will check whether any application pool inside IIS is stopped. If it found it will start that application pool.

then, we have created task scheduler which runs automatically in every 30 mins  and attached the above script.

Thanks to Jay Mehta for sharing such nice code / information.

Happy Coding !!!