Sharepoint

FileNotFoundException was unhandled in Console Application

When I feel like to act together with SharePoint site to obtain data, quickly I will create a console application project to interact with SharePoint site instead of creating standard/visual webpart or custom solution

I am fond of console applications since there is no need of packaging the custom solution, deploying, activating etc. Just write the code and hit F5, if it run…runs, if not throws the error right away ๐Ÿ™‚

As I am comfortable with console applications in the same passion today I have created one console application project on SharePoint 2010 server and tried to list subsites from a site, the code be incredibly straightforward with not many lines, as soon as I hit F5 it thrown an error message saying that

FileNotFoundException was unhandled
The Web application at http://fivenumber:5 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.

FileNotFoundException was unhandled

FileNotFoundException was unhandled

The same code executes on MOSS 2007 server with out any problem.

I had Bing for a moment finally dig up the resolution, as there is hardware difference, between MOSS 2007 and SharePoint 2010.
Console applications by default targeted to x86 platform, therefore comprise to change the console application project properties to x64 or Any CPU

To resolve, right click on project and select Properties

Right click on project and select properties

Right click on project and select properties

Click on Build tab, under Platform target section select the option x64 or Any CPU then save the changes and run the code once again

Click on Build Tab

Click on Build Tab

Keep coding, Good Luck ๐Ÿ™‚

SharePoint Event Handlers – Asynchronous Vs Synchronous

There is a little puzzlement among Asynchronousand Synchronous events, however I believe after reading this article, there will be no place for confusion in your brain, the reason for that I go behind a childlike practice to memorize what is Asynchronous ? and what is Synchronous ? Continue reading…

Customizing SharePoint 2010 Social Tags: I Like It | Tags & Notes

When I was customizing the SharePoint 2010 V4.master I found theย  Social tags I Like It and Tags & Notes which are new in SharePoint 2010. The tag is a SharePoint Delegate control

The tags are occupying big amount of area, so our client told to minimize the icons to make use of space, also he given the hint that Continue reading…

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

When I am trying to run powershell window for the first time after installing SharePoint 2010 I was faced with a message that

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

Then, I did Bing search for some time and found the solution and the same I want to post here, so that it may be useful for some Continue reading…

SharePoint 2010 and Office 2010 Launch

Microsoft officially announced that 12th May, 2010 is the date of launch for SharePoint 2010 and Office 2010
All of can virtually join for the event on 12th May, at 11 a.m EST to listen to Stephen Elop, President of the Microsoft Business Division, please register for the event on the following link
http://sharepoint.microsoft.com/businessproductivity/proof/pages/2010-launch-events.aspx