Visual Studio and SharePoint 2010 new SPSite returns FileNotFoundExceptionMarch 22, 2010 13:26While writing my first console application to communicate with SharePoint 2010, I was surprised to receive a FileNotFoundException during the creation of a new SPSite. The line SPWeb web = new SPSite(”http://localhost/”).OpenWeb();
returned the error statement: FileNotFoundException was unhandled:
The Web application at http://localhost/ 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. At first I assumed that the error was caused by invalid user rights, but after some searching this forum post at Microsoft Technet came up with the right solution. By default the console project is build for the .Net 4 framework and and the x86 platform. Because SharePoint is only available as a 64bit version, the console app should also be compiled for the 64bit platform. By changing the framework to .Net 3.5 and the target platform to x64 the issue was resolved. Tags: .Net 3.5, 2010, 64 bit, console, exception, File Not Found, framework, platform, spsite, spweb.SharePoint 2010 Mobile Web Part developmentJanuary 17, 2010 22:15
The mobile rendering engine of SharePoint provides mobile users access to the sites with a completely stripped interface. Its main function is to list all libraries and to provide basic access to them. For wiki and blog sites the rendering engine also provides some content rendering. To keep the amount of data as low as possible, almost all web parts are completely stripped from the mobile site. Only when a web part developer provided a special mobile version of the web part, the web part will be accessible in the interface and to keep the mobile screen as empty as possible, the user must first expand the web part via its title to see it. Documentation about SharePoint Mobile development is provided at MSDN. At first it all looks quite complex, but building a mobile version of a web part is actually not that hard. Below I will explain the required steps with a ‘Hello world’ example. For this sample I will not rename the default object names provided by the Visual Studio templates. Tags: 2010, demo, Mobile, SharePoint, web part. |
||