views:

257

answers:

2

I am trying to use YAF with Umbraco. The newest version out changed enough where the old integration methods don't seem to work. I have gotten everything fairly far on my own but I have hit a brick wall with this error:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source Error: 


Line 23:     <img src="~/yaf/images/YAFLogo.jpg" runat="server" alt="YetAnotherForum" id="imgBanner" /><br/>    
Line 24:     <form id="form1" runat="server" enctype="multipart/form-data">
Line 25:         <YAF:Forum runat="server" ID="yafForum" />
Line 26:     </form>
Line 27: </body>

I have a feeling that YAF is not starting up the database. In previous versions of YAF there was an INIT module that you loaded in your web.config file. This module is no longer there (YAF.Base.YAFInitModule).

A: 

It looks like you're trying to run YAF in a .net 4.0 environment. The YAF assemblies, however, are built in .net 2.0. This could be the cause of your problems.

You can download the YAF source and change the project's properties to build to .net 4.0 instead.

sebastiaan
Hmmm...I thought that 4.0 was backwards compatible
Mitchell Skurnik
Oh no, it's a whole new runtime. In fact, as per the instructions on installing YAF, you'd apparently have to do a build for 3.5 as well, even though it's an extension of 2.0. Not sure why that would be the case though..
sebastiaan
That ended up creating more issues. I have contacted the owners of YAF to see if they can help me.
Mitchell Skurnik
Turns out it was something else http://our.umbraco.org/forum/getting-started/installing-umbraco/11233-Umbraco-and-YAF?p=1 .
Mitchell Skurnik
A: 

I didn't come up with this but here is the solution from http://our.umbraco.org/forum/getting-started/installing-umbraco/11233-Umbraco-and-YAF?p=0:

Make sure your YAF installtion is really accessible. I know this sounds kind of odd, but I

had to alter YAF.FileRoot and YAF.AppRoot several times until I got it up and running again - see app.config). The best way to test this is to overwrite your main web.config (the one from Umbraco with the default web.config from YAF.Net and see if you get the forum running in the subfolder (or folder structure) For test purposes you might have to temporarily remove Form.browser from your App_Browser directory as this file caused a lot of parsing errors when I only ran YAF.Net (which is pretty clear as we do not have the right references) Remove Umbraco Channels path="umbraco/channels.aspx" path="umbraco/channels/word.aspx" from the web.config as they use a different CookComputing.XmlRpcV2.dll than YAF.Net does (apparently Umbraco uses still a pretty old version)

Umbraco and YAF also differ in the CookComputing.XmlRpcV2.dll file. Umbraco uses 2.2.0.4 while YAF uses 2.4.0.0. You need to deploy the 2.4.0.0 version to your server's GAC to get this working right

Mitchell Skurnik