Thursday 11 August 2011

SharePoint 2010 Windows Form App Error: The Web application at could not be found.


While trying to create a new instance of SPSite in a windows form App,we usually get an error saying "System.IO.FileNotFoundException: “The Web application at http://serverurl could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application."
And usually we keep verifying again and again if we have typed URL correctly or not.
Solution for  this problem is 

 Under Project Properties –> Application, Ensure that the target framework to be compiled against is .NET Framework 3.5
 Under Project Properties –> Build, Ensure that the platform target is set to x64.
Hope it helps people in trouble....:-)

Programmatically adding Web Parts in SharePoint 2010



Sometime it's a tedious task to go and add webpart on each of the page.So we can automate it through code.This can be easily achieved using
SPLimitedWebPartManager.AddWebPart Method


jQuery and jQuery Plugins

 jQuery can be used to develop highly interactive web applications.We  can also write our own plugin and then use it with jQuery.