Posts

Improve Deployment Times for Mobile Project in Visual Studio 2008.

While working on a project mobile device in Visual Studio 2008 targetting .Net Framework 3.5, you can run into a issue where the deployment to the emulator can take a minute or more. There are a couple of ways that will help you get around this issue. First Method Step 1: Open windows explorer and go to C:\Windows\Microsoft.NET\Framework\v3.5 Step 2: Take a backup of the file Microsoft.CompactFramework.Common.targets Step 3: Open the file Microsoft.CompactFramework.Common.targets (You can open this file in Visual Studio) Step 4: Find this line    and change this to      Step 5:Save the file Step 6: Close and Reopen Visual Studio. Second Method Step 1: Open your mobile project in Visual Studio 2008 Step 2: Right click on the project and select Properties. Step 3: In Propeties screen, go to the Debug tab and add " /p:SkipPlatformVerification=true" to the Command Line Arguments. I prefer the second method as i am not changing a system setting and it...

New NetCFSvcUtil.exe for Windows 7 Environment.

If you are going to writing WCF Services for mobile devices, you have to use the NetCFSvcUtil tool to generate  a Windows Communication Foundation (WCF) client proxy to help developers consume WCF services on device.If you have Windows 7 then use this link   http://download.microsoft.com/download/6/2/0/6205ED05-E435-44FC-AA82-B763CA5F8B1A/NetCFSvcUtil.exe to get the version of NetCFSVCUtil.exe.

"405 Error: Method not Found" When you deploy WCF Service on Windows 7.

Image
When you deploy WCF Service on Windows 7 machine to IIS 7.0 and try to browse to the service from a browser you might get the 405 Error: Method not Found. One of the reason this might happen is that the feature "WCF HTTP Activation" and "WCF Non-HTTP Activation" are not installed by default. to enable these feature go to Start --> Control Tools --> Program and Feature. Click on "Turn Windows Features on or Off". On the "Turn Windows on or Off" dialog box, go to the section "Microsoft .NET Framework 3.5.1" and check both the boxes below this feature and click on the "Ok" button to install this feature. Once this feature has been installed, you should be able to browse to the WCF Service deployed to IIS 7.0.

Powershell Script that will deploy/upgrade Farm Based Solution to all Site Collections

This Powershell script can be used to deploy/upgrade your farm solutions to all the site collections in the farm. # SharePoint DLL [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #Cmdlet Install Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue ###REGION FUNCTIONS ##################################################################### #Adds a farm solution to a site. ##################################################################### function AddSolution() { $myError = $null Add-SPSolution -LiteralPath $Solution -ErrorAction:SilentlyContinue -ErrorVariable myError -Confirm:$false if ($myError -ne $null) { write-host -ForegroundColor 'red' $myError $myError = $null } else { write-host -ForegroundColor 'green' "Sucessfuly added the solution to the site" } } ##################################################################### #Deploys...

Apply Custom StyleSheet to the SharePoint 2010 Publishing site.

When you are implementing a custom stylesheet for a publishing site in SharePoint 2010, make sure that the custom stylesheet is the first one that is declared, like the declaration below, and also specify the value of the "After" attribute as nightandday.css. If this is not done then you will see that the nightandday stylesheet will still override some of the classes.   A good way of debugging the styles that are applied in SharePoint is to navigate to the SharePoint page in IE 8.0 or higher and press F12 key. This will open the developer tools window and you can navigate to the HTML element and look at the styles are being applied or overridden.

Workflow does not start automatically when items are created by a Web Application in SharePoint 2010

We had a Users list in SharePoint 2010 to which a workflow was attached. This workflow fires off when a item is created in the Users list. The Users list was getting populated through a web application which would let the users enter the data and then save the data to the Users list using the ClientContent object.         During testing, we made the application pool for the custom web application run under the same user as that of the SharePoint 2010 web application. This caused a wierd behaviour in that the items were getting written the User list but the workflow was not firing. There were no errors in the application logs, SharePoint logs or anywere else.        Turns out that SharePoint 2010 has a security feature that will prevent the workflow from starting automatically when items are created in a list from a custom Web Application which has the same Application Pool credentials as the SharePoint Application Pool. ...

Powershell Script that will deploy/upgrade Sandbox Solution.

Script that will let you deploy/upgrade a sandbox solution to a SharePoint 2010 site. Make sure that you at least an SharePoint site administrator before you run the script. # SharePoint DLL [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #Cmdlet Install Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue ###REGION FUNCTIONS ##################################################################### #Adds a Sandbox solution to a site. ##################################################################### function AddSolution() { $myError = $null Add-SPUserSolution -LiteralPath $Solution -Site $SiteURL -ErrorAction:SilentlyContinue -ErrorVariable myError -Confirm:$false if ($myError -ne $null) { write-host -foregroundcolor 'red' $myError $myError = $null } else { Write-host -foregroundColor 'green' 'Sucessfuly added the solution to the site' } } ...