This is starting to get dangerous…I’m blogging about SharePoint development twice in a row. Again, this may be something very basic to most SharePoint developers, but as I learn, I enjoy blogging about issues I’ve discovered and things I’ve learned as I continue to develop more.
My next venture into SharePoint development is to create some custom .ASPX forms for use within our SharePoint environment. For our situation, InfoPath Forms Services would make much more sense, unfortunately, we only have SharePoint 2007 Standard with no plans to go to Enterprise.
So, I created a very basic .ASPX file with an equally as simple .cs (code behind file), packaged it all up as solution and deployed it. However, when I went to access the site, I encounter a “Could Not Load Type…” error. After a quick search on Google, I found – http://blogs.catapultsystems.com/matthew/archive/2007/12/07/could-not-load-type-error.aspx between that post and the post by Andrew Connell that was referenced there I was able to solve my problem.
When I had created my .aspx file I had failed to use the “5 part name” to reference the assembly file. I had put Inherits=”NewForm.NewForm” rather than Inherits=”NewForm.NewForm, NewForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=*********”
As soon as I changed my .aspx file to use the 5 part name and redeployed my solution everything worked perfectly!
The other day I was building a PerformancePoint development environment for a co-worker. When writing custom code to extend the functionality of PerformancePoint you either need to install Visual Studio 2005 along with the SDK, or you can just install Visual Studio 2008. I figured, why not just use Visual Studio 2008.
After installing SQL, MOSS, PerformancePoint and Visual Studio 2008, I handed over the development environment , within a few minutes my co-worker was telling me he was getting errors when trying to connect to the PerformancePoint web service. I dug into it and found that the web service as well as the Preview site, calls for System.Web.Extensions version 1.0.61231.0, while, in our GAC, we had System.Web.Extensions version 3.5.0.0. I opened up the web.config files and changed all reference from 1.0.61231.0 to 3.5.0.0. This seemed to work fine, I could get to the Preview Site and access the web service.
Once again I let my co-worker have a go at it. He got a little further this time and then tried to publish his dashboard, and once again got an error, this time it was in the dashboard page itself though. At this point in time, due to some time constraints, we decided to bag the idea of switching everything over to System.Web.Extensions 3.5.0.0, so I uninstalled the .NET 3.5 framework (that installs with Visual Studio 2008), copied the System.Web.Extension and System.Web.Extensions.Design 1.0.61231.0 files from another machine into the GAC on my develop machine and everything works fine now.
My last remaining curiosity is, if make sure I install the .NET 3.5 framework before I install PerformancePoint, will PerformancePoint pick up on the newer version of System.Web.Extensions? If anyone knows leave a comment, and if I find the answer or have time to go back and give it a trial myself, I’ll post the results.