YAFLogo

Pinguino
  • Pinguino
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
2011-09-21T19:33:35Z
Instead of asking for a walkthrough  (although if one exists somewhere I'm still interested) I'll ask for help:

I'm using VWD express 2010 and YAF 1.9.5.5 bin

  • I have an web site running in root (i.e., a web app).

  • I installed YAF bin version into a subdirectory (~/yaf/) as an application and it worked nicely.

  • I removed the 'application' in iis manager.

  • I moved /yaf/bin to /bin

  • I moved the App_browsers contents from /yaf/App_Browsers to /App_Browsers

  • /yaf/App_Code was empty: nothing to do there.

  • In app.config I added a key for fileroot ( <add key="YAF.FileRoot" value="~/yaf"/> )

  • I moved the config files to root and merged web.config with the old one.

  • The only 'conflict' in web.config that I could see was the asp.net membership -- I commented out my app settings and left YAF configuration.

I attempted to build the website and I get:

Compiler Error Message: CS0234: The type or namespace name 'Utils' does not exist in the namespace 'YAF.Classes' (are you missing an assembly reference?)

The Bin/ contains:

Quote:

Autofac.dll

Autofac.xml

CookComputing.XmlRpcV2.dll

Intelligencia.UrlRewriter.dll

Intelligencia.UrlRewriter.XML

Moq.dll

Moq.xml

nStuff.UpdateControls.dll

YAF.Classes.Config.dll

YAF.Classes.Config.XML

YAF.Classes.Data.dll

YAF.Classes.Data.XML

YAF.Controls.dll

YAF.Controls.XML

YAF.Core.dll

YAF.dll

YAF.Providers.dll

YAF.Providers.XML

YAF.Types.dll

YAF.Utils.dll

YAF.XML

Help!

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0 RC 2
2011-09-21T23:31:37Z
Take a look in your web.config if it contains a "YAF.Classes.Utils" if yes rename it to "YAF.Utils".
UserPostedImage
Pinguino
  • Pinguino
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
2011-09-22T04:13:42Z
It's in two sections (pages and profile), like so:

Quote:

<pages><controls>

<add tagPrefix="YAF" namespace="YAF.Classes.Utils" assembly="YAF.Classes.Utils"/>

...

</controls>

<namespaces>

...

<add namespace="YAF.Classes.Utils"/>

...

</namespaces>

</pages>

And:

Quote:

<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">

...

It seems strange that it would work out of the box with this configuration, and then need changing just because I've moved a few things around. However...

...(off I go to try)...

I changed both and now (on build) it returns 15 errors with variations of:

Quote:

c:\Users\...\www\web.config(57): error CS0234: The type or namespace name 'UI' does not exist in the namespace 'YAF.Classes' (are you missing an assembly reference?)

and 48 warnings along the lines of:

Quote:

The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll'

or

The predefined type 'System.Action' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll'

Sigh...

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0 RC 2
2011-09-22T05:46:39Z
Looks like you merged an old yaf web.config. A few things have changed in yaf 1.9.5.5 all remove all classes from yaf.classes in the web.config.

And please take a look at the recommend.web.confi which is included in yaf, also the readme file describes which entries you need to update in your web.config when upgrading to yaf 1.9.5.5 or higher.


UserPostedImage
Pinguino
  • Pinguino
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
2011-09-22T13:39:33Z
I notice that the 2 distributions (src/bin) are subtly different (in file names anyway). Is there any difference in content of the files? Should I choose either src or bin over the other?
Pinguino
  • Pinguino
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
2011-09-22T18:09:46Z
Never mind (I checked with winmerge) I see the recommended web.config files are identical, and obviously mine is different. That's really weird ... unless I copied mine from the version that I installed with the Web Platform Installer (I installed several versions and I'd never used the Platform installer to install anything like that so...).

Ah, yes, that looks more like my web config. grnnrnngh (too much time wasted). Well, hopefully this is the fix.

Pinguino
  • Pinguino
  • 56.6% (Neutral)
  • YAF Camper Topic Starter
2011-09-22T19:39:53Z
Ahem, :oops:

At the very least, I certainly got to know the config files well. And I can say that with a bit of practice, setting up yaf is very quick. Thanks so much for identifying the problem!

What I did (Overview):

  1. Create subdirectory /forum/ off root of my main app.

  2. Into this directory copy all EXCEPT

    app_data/

    app_browsers/

    app_code/

    bin/

    and all the .config files

  3. Copy the contents of the folders (if any) into the corresponding folders in the root of the application. EXCEPT, I use sql server (not sql express) so don't have a database in the app_data/ directory. So you're on your own there unless you're like me.

  4. Modify the .config files and copy them to the app root directory (see below)

  5. If you want the forum in your own page (e.g., masterpage) then

    create a page with:

    <%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>

    at the top and:

    <YAF:Forum runat="server" ID="forum" BoardID="1" />

    where you want the forum to appear on your page. Otherwise, you can just use the existing default.aspx in the /forum/ directory.

    http://www.yourwebsite.com/forum/  and follow any prompts as it connects to your database and displays the forum.

Done!

The config files:

  1. web.config: merge the 'recommended' web.config with your existing web.config. Cut'n'paste baby!

    (I chose the 'get it working first' method, and commented out my existing settings if they duplicated YAF settings ... then go back later for those)

  2. app.config: I set the fileroot, baseurl, approot. The rest should be handled by the setup application when you browse the site the first time.

  3. db.config: set up the connection string (this might also be handled by the setup routine).

  4. mail.config: manually change or let the setup handle it.

That's it!

You'll want to set up a user/login in your database if you don't already have one (??) and set it as dbo.

(Using MSSQL Mgmt Studio: in root level choose security > logins and create a new login (probably uncheck the obey password policy unless you're using it). Under the database, choose security > users > create a user (same name) and assign it dbo access for the database.

Also, creating the page with the forum inside the forum directory seemed to work better. Makes me wonder if I've gotten the app.config settings quite right.

I'm sure time will tell with these and other details.

Good luck all!