YAFLogo

mainshipsystems
16 years ago
I'm a VB programmer, maintaining a VB site, and I want to use YetAnotherForum. I want it to live in a folder, say in www.mydomain.com/forum.

I know I can add a web project to my web site, so there is no conflict between the C# and the VB. I just don't know how to do it. Can someone give me a walk through?

Diane

Sponsor
test2005
16 years ago
Hey Diane, still having problems? Thought we got ya sorted in the other post (http://forum.yetanotherforum.net/yaf_postsm25113_Can-this-be-used-on-a-VB-site.aspx#25113). Guess not! :-P

Right...you have 2 choices. For reference, we'll call the main app "MyApp" and the forum (wait for it...) "YAF"!

Create 2 seperate projects in VS. One called "MyApp" and the other "YAF". More tha likely, these already exisit, so no work involved!

When you "publish", do it to different directories (not FTP).

Then "move" the YAF compiled project into the MyApp/forum folder.

Move the YAF.dll to your MyApp/bin directory.

Then merge you web.config files of the 2 apps.

Also copy the other YAF *.config files to the root of MyApp

Choice 1 (easiest to manage IMO): wrote:

Creat a new blank project in VS.

Then, on the right-hand side, in "Solution Explorer", right-click the top level and select "Add>Existing Project..." or "Add>Existing Website..." (depending on how you've created MyApp and YAF.

You will then see the 2 projects under the same solution.

When you publish, both will be compiled and exported to a single location (either local or FTP, whichever you choose)

As before, language is irrelevant. You can even reference one project in the next!

Choice 2 (better integration): wrote:

HTH

:-P


.....the man in black fled across the desert..........and the gunslinger followed.....

mainshipsystems
16 years ago
Yeah, sometimes it take a while for me to get my head around new concepts. To me, a website is a website, solutions and projects made no sense. Someone on another forum explained all that to me. With that understanding, between this post and the one you referenced maybe I can finally get this off the ground.

Though I will probably want to add the forum to existing sites, what I'm working on first is a new one. So I just created the website as a 3.5 ajax enabled website in VB. I added a new asp.net website in c# and called it yetanotherforum.

Ok, so I now have my two websites in the same solution. Both are empty. I'll set up the forum and get a few files up on the other. Then what? I see where I can set the startup project.

So far, I've been uploading my sites via ftp. I've never 'published'. Is it a better way to do it? If I use ftp, do I put the two websites in separate folders off the root? Or do I put the yetanotherforum website in the 'forum' folder?

I'm still a bit hazy on the relationship between the two.

Thanks for your patience,

Diane

test2005
16 years ago

Hazy....my favorite way to program!!! :shock:

First off, "Project" is nothing more than manager-speak for "website". Unless you build desktop apps, mobile apps, etc (then "project" means "whatever I'm building, right now!). Microsoft (MS) decided that programers needed to sound more official when talking!!

Hence...."I'm building a new project!" sounds much more official than "I'm building a new webiste!". They mean the same!

A Solution is a bit more complex. Look at it in terms of a house. You build rooms (projects) in a house. Each room has a purpose (or should!). When you "classify" all of the rooms together you get a "house". In Visual Studio terms, all of your "Projects" together make a "Solution" (the house). SO...You build a project(website) that shows off your peanut-butter collection!. You want people coming to this site to be able to use a forum, so you add YAF (another project). The SOLUTION contains a peanut-butter site and YAF. (mmmmm...my favorite...peanut-butter and YAF!!!)

Simply put, the solution is the major container holding your projects.

Your next question is a bit more complex and depends on which version of Visual Studio you have. I'm running VS 2008 Pro, and have several ways to get my projects onto the web.

The first is "Website>Copy Website" option. This does just what it says, COPIES. It DOES NOT compile. If you have written custom code to perform actions, and you "copy website" to your host, you will be relying on the IIS JIT (Just In Time) compiler to server your pages. With small sites, this is no big deal. YAF, on the other hand, is NOT a small site! The resource requirement to JIT compile YAF would slow down your site tremendously.

So...."copy website"....if small site...use it.....if code intensive...."publish"

Second option is "Build>Publish Web Site".

This is my preferred option for websites (and YAF) as it cuts the overall file size by half (usually). What happens is every web page, control, class, etc....gets compiled to a DLL file (the file in the BIN dir). This "final stage" is what gives VS the ability to code in different languages at the same time. When you hit publish, your code is first compiled to IML (Intermediate Markup Language), then to DLL. You can research what IML is, lets just say "it's the magic part of compiling"! Your site is in VB....YAF is C#...yet they compile to one site! Nifty! :)

This method gives you options to "publish" to...

1. file system - a blank folder on your PC. I use C:\VS_Builds. I then use CuteFTP to upload the compiled site to it's host location.

2. Local IIS - If your testing, or hosting the site on your local machine, this will copy the compiled site to the location configured in IIS. Ideal when testing!

3. FTP Site - Similar to item 1, it just does the FTP for you. I've found this un-reliable and difficult to control what does and does not get publish. Have a play, but item 1 is easier!

4. Remote Site - If you have Frontpage Extensions installed on your host server, you can set them up to receive updates via HTTP (just like browsing a normal website). This has the advantage of using port 80 of your internet connection, which (normally) has a faster connection that port 21 (ftp). I've never used this, but I know folks who swear by it, especially on slowwer connections.

Now...after all this (sorry for the length)...how does it apply to you?

do I put the two websites in separate folders off the root? Or do I put the yetanotherforum website in the 'forum' folder?

Not unless you want to! Keep in mind, you want your "primary" site in the root (www.mydomain.com/default.aspx

), but YAF in the /fourm directory. So FTP all of YAF into /forum and you will be able to access it via www.mydomain.com/forum/default.aspx

You can not "publish" the solution, just the underlying projects. So when you publish YAF, choose the /forum folder of the published location of the mainsite. Then move the BIN dir out to the root, move the config files out to the root (you will have to merge your web.config files of the main site and yaf, as there can be only one!)

Hope this rant helps :cheesy:

:-P


.....the man in black fled across the desert..........and the gunslinger followed.....