YAFLogo

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-04-30T05:54:51Z
I am trying to integrate YAF with existing site. Here are the exact steps I took:

1. Download latest build from codeplex (build from Jaben on April 28)

2. Extract all files in /forum subfolder

3. I moved the following to main root folder: all config files, App_Browser, App_Data

http://yafnet.codeplex.com/wikipage?title=YAF.NET%20Integration%20in%20to%20an%20existing%20ASP.NET%20Application&referringTitle=Documentation 

I could not find /Bin and /App_Code folder at all in the latest builds.

When I run /forum/install/default.aspx, I get the following error in web.config file:

CS0246: The type or namespace name 'YAF' could not be found (are you missing a using directive or an assembly reference?)

I tried moving YAF.csproj to root folder but it still is not working and gives above error message.

However when I download the latest build and run it as is (without creating /forum subfolder) then it is working properly.

Any idea what files I should be putting in root folder based on these nightly builds?

I am guessing /App_code folder is not there in root folder and it is trying to find that file and erroring out.

It looks like catch 22 scenario: Since I cannot run /install/default.aspx, it cannot create /App_Code folder. And it cannot run /install/default.aspx since it first loads web.config and errors out (since App_Code folder is not present).

Thank you for your help :)

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0 RC 3
2013-04-30T14:21:11Z
Quote:

I could not find /Bin and /App_Code folder at all in the latest builds.

No there is no app_code folder anymore. What nightly builds are you mean?

I downloaded the latest nightly build from the build server (http://build.yetanotherforum.net/) and there is a bin folder in the zip.


UserPostedImage
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-05-01T02:57:54Z
I am downloading the nightly build from the codeplex site.

http://build.yetanotherforum.net  and it does have /Bin folder in it (which is not present in codeplex site). I had assumed that both sites (codeplex and build.yaf.net) had the exact same files.

Thank you for pointing out the difference 🙂

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0 RC 3
2013-05-01T03:52:29Z
Originally Posted by: johnk 

I am downloading the nightly build from the codeplex site.

http://build.yetanotherforum.net  and it does have /Bin folder in it (which is not present in codeplex site). I had assumed that both sites (codeplex and build.yaf.net) had the exact same files.

Thank you for pointing out the difference :)

No the codeplex page doesn't have any nightly builds, it only contains the source code. And if you want to use it from there you need to compile it yourself.


UserPostedImage
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-05-02T06:24:09Z
I download the latest build from build.yaf.net site and integrated into existing site (per the updated doc on codeplex mentioned above)

When I ran the /forum/install.aspx page, it gave me the following error

"Could not load file or assembly 'Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified."

When I looked into /Bin folder, it did NOT have the file "Autofac.dll" file.

So, I downloaded the entire source code and did a build (by running the build.bat file). The build was successful.

I noticed the following differences:

In newly built folder: /Bin had 46 files (including Autofac.dll)

In prebuild folder (from build.yaf.net): /Bin only had 19 files.

Questions:

1. I am guessing something is wrong if the prebuilt folder /Bin only has 19 items in it (instead of 46)?

2. Did I create the build correctly (by using build.bat file)?

3. What is the difference between build.bat and buildpackage.bat (when to use each one)?

Thank you for your help 🙂

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0 RC 3
2013-05-02T14:05:59Z
Originally Posted by: johnk 

In newly built folder: /Bin had 46 files (including Autofac.dll)

In prebuild folder (from build.yaf.net): /Bin only had 19 files.

1. I am guessing something is wrong if the prebuilt folder /Bin only has 19 items in it (instead of 46)?

2. Did I create the build correctly (by using build.bat file)?

3. What is the difference between build.bat and buildpackage.bat (when to use each one)?

Thank you for your help :)

1. Looks like there are two dlls missing it should been 21 dlls (you only need the dlls) AutoFac.dll and Omu.ValueInjecter.dll. But i don't know why i don't maintain the server.

2. Yes if you dont have Visual Studio.

3. The differences are that the build.bat does only compile the solution. The Buildpackages compiles and creates 3 different ZIP Packages

1 = Source Package (YAF-v2.0.0.0-RTW-SRC)

2 = Install Package (YAF-v2.0.0.0-RTW-Install) that contains all files when you want to make a new Install of the forum

3 = The Upgrade Package (YAF-v2.0.0.0-RTW-Upgrade) that contains all files when you want to upgrade an forum installation.


UserPostedImage
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-05-03T05:18:28Z
I did a manual check. In the prebuilt zip file, there are only 15 DLLs in the /Bin folder. The other files are two PDB, one config and one XML.

In the manual build, there are 21 DLLs, 1 config, 13 PDB and 11 XML files.

Also does the build.bat file make changes to any other folder (apart from /Bin)? I noticed the /obj/release folder was updated (all three files).

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-05-03T07:37:59Z
Update:

I just downloaded the full source code. Then I ran build.bat to compile it. I copied the web.config to root folder. Then I ran /install/default.aspx and I keep getting the same error:

Failed to map the path '/'.

Source File: d:\yafnet-e93edaa82782\yafnet_e93edaa82782\yafsrc\YAF.Utils\Helpers\ConfigHelper.cs Line: 100

http://build.yetanotherforum.net  site or to codeplex site?

I have attached the error message in screenshot below:

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0 RC 3
2013-05-04T17:33:20Z
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-05-05T05:34:35Z
Thank your for uploading the latest build. I am still getting an error after clean install. Here are the steps:

http://build.yetanotherforum.net 

2. Install in a new folder

3. Move web.config to root folder (and turn off customerror in webconfig)

4. Run /install/default.aspx

The error is

Failed to map the path '/'.

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.InvalidOperationException: Failed to map the path '/'

I also checked the /Bin directory has 21 DLLs in it. I haven't changed anything else. Its a clean install.

I have attached a screenshot of the error message. In the screenshot, if you look into the section [ConfigurationErrorsException:], it looks like some path is hardcoded

c:\TeamCity\buildAgent\work\a43418c417bd9823\yafsrc\YAF.Utils\Helpers\ConfigHelper.cs:100

c:\TeamCity\buildAgent\work\a43418c417bd9823\yafsrc\YAF.Utils\Helpers\ConfigHelper.cs:139

c:\TeamCity\buildAgent\work\a43418c417bd9823\yafsrc\YAF.Utils\Helpers\ConfigHelper.cs:73

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
2013-05-05T06:19:59Z
Update (I was able to resolve the error):

I created the folder which was hardcoded "c:\TeamCity\buildAgent\work\a43418c417bd9823\yafsrc\" and copied all files in it.

Then when I ran /install/default.aspx, it told me the exact souce of error

It was in line 100 of ConfigHelper.cs

return this._webConfig ?? (this._webConfig = WebConfigurationManager.OpenWebConfiguration("~/"));

I did a google search and found out that it is for getting web.config of remote server (in this case ~/).

Then I check my Visual Studio Express 2012 server setting and it was running under "Visual Studio Development Server". I simply changed it to "IIS Express" and suddenly the pages started loading correctly.

I had read a long time ago that Visual Studio Development Server is very secure and blocks all outside access. In this case it was also blocking the code in Line 100. Hence changing it back to IIS Express made it work correctly. Thank you so much for your help. I will continue testing and post bug report here.

BTW, the folder in "c:\TeamCity\buildAgent\work\a43418c417bd9823\yafsrc" is no longer needed - though it was useful to get to the actual error message. Thanks again 😁