Posted by ken zheng on August 3, 2011
When using SharePoint 2010 Server OM code on a Windows 2008 64 bit server, you get below exception :
The Web application at http://servername:portnumber/sitename/ 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.
You are using a very simple code and the exception occurs at the very first line while opening new instance of an SPSite :
using (SPSite osite = new SPSite("http://blrs2r11-1c/"))
using (SPWeb oweb = osite.OpenWeb())
Label1.Text = oweb.Title;
The solution is in your visual studio, change the target platform to 64 bit.
Update: Or you may not have permission to run the code.
Posted in Sharepoint, vs2010 | Tagged: SharePoiint 2010, vs 2010 | 1 Comment »
Posted by ken zheng on December 2, 2009
In .Net 4.0, there is a new way to store the cache. It is Velocity and current on CTP.
Velocity is a custom session provider that can replace the ASP.NET default session provider. See this blog for more details
Posted in .Net, vs2010 | Tagged: .Net 4.0, Velocity, vs 2010 | Leave a Comment »
Posted by ken zheng on October 27, 2009
I believe you have notice vs 2010 beta 2 is available for download http://www.microsoft.com/australia/visualstudio/default.mspx.
There is a great set of training resources for Visual Studio 2010 & Fx 4 Beta 2 in the form of the Visual Studio 2010 and .NET Framework 4 Training Kit and check out http://channel9.msdn.com/learn/ for more great learning materials.
You’ll find material covering
1. What’s new for Common Language Runtime
2. ASP.NET 4
4. Windows Workflow
5. Windows Communication Foundation
7. Data Access
8. Parallel Computing
9. Extensibility Framework
10. Application Lifecycle Management
so check it out and get up to speed fast with the Visual Studio 2010 and Fx 4 Beta 2!!
Posted in vs2010 | Tagged: .Net 4, vs 2010 | Leave a Comment »