Answered by:
Independant releases of sub folders compiles

Question
-
User1501297963 posted
We are trying *not* to make individual applications.
But we want individual sub components (folders) released independantly.
So if I had
Main Site
Sales
Company
Admin
CustomersMy bosses would like me to be able to independantly compile and release Sales without having to compile the rest of the site and install everything.
So, I created to separate physical website folders with the code
Main Site
Sales
I use WDP to compile each one of them into there deployment directory.
If I then go and take Main Site and move it into the Virtual Directory it suppose to house it runs without sales added which is good.
If I then take Sales And move it into a sub-folder under the Main website virtual directoy like so
Main Site
bin
<files and folder for main>
Sales
bin
<files and folders for sales>When I transverse to http://localhost/mainsite/sales/default.aspx
I get an error saying /mainsite/sales/default.aspx' has not been pre-compiled. It has been precompiled all the compiled files and dlls are in the Mainsite | Sales | Bin directory and the aspx and ascx are 1 byte files.
So, I move on and say well maybe I need too have the Sales | Bin folder files in the Main Site | Bin folder
I get the same error.
the only way I can get this to work is splitting sales up into its own application
So I have
VD/Application called MainSite referring to it as http://localhost/Mainsite
VD/Application called Sales - referring to it as http://localhost/SalesAny thoughts about getting it to work with out every app being a vd - we are trying to share session and cache states is the problem.
Thanks,
AngelaFriday, April 3, 2009 11:59 AM
Answers
-
User372121194 posted
Hi,
From your description, I understand that you want to build one sub directory and only update this sub directory on server, right?
If so, you can publish your website with updatable option, then the .compiled files won't be created.
After you build Sales directory with updatable option, please copy the Sales folder contains to root website's Sales directory and copy assembly from Sales directory to root website's bin folder. With this, we don't need to create separate application for Sales directory. New Sales page will load new assembly from root bin folder.
I look forward to receiving your test results.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, April 8, 2009 11:09 PM
All replies
-
User1052258516 posted
With this structure
Main Site
Sales
Company
Admin
CustomersDid you make all of these Virtual Folders? So create the Main Site VFolder then create a VFolder in the Main Site VFolder called Sales? or is it just Main Site is a VFolder and the rest are just regular "folders"?
Friday, April 3, 2009 10:39 PM -
User1501297963 posted
Hi thanks for responding...
It is hard to discuss with terminology something that gets corrected in IIS 7.0.
But we are using IIS 6.0
So I have made them all VDs (meaning there own applications pools) with this way it works but can't share session and cache state.
I have also made it as Main Site VD (meaning its own application pool) and with folders underneath for the other parts that does not work with individualized compiling
Next I have made the Main Site the VD(meaning its own application pool and then the sub apps being (VD NO application pool) and I get the same error.
Right now the only alternative I have is use the first solution with a 3rd party caching system like scale out or n-cache so the session and cache state can be saved.
My boss, like any boss, wants to make sure that it is necessary to spend the money on the 3rd party software.
I can't think of another way, so I came here to see if any one else has done it differently?
Thanks fo ryour help :)
AngelaWednesday, April 8, 2009 12:25 PM -
User1052258516 posted
Didn't know you used the session object, so lets try something else.
What tool are you using? Visual Studio 2005, 2008? and do you have an app_code folder in your project?
If you have the app_code folder then you might have to switch to the other kind of ASP.NET project type (yes there are two in Visual Studio). What you want to do is create a ASP.NET Web Project/Application what this allows you to do is create one dll for each "site", you then would place all of the dll files in the bin folder of the MainSite for each site and the content files in their respected folders.
So
MainSite
<bin>
Default.aspx
<Sales>
Default.aspx
<Company>
Default.aspx
<Customers>
Default.aspxThis way you would never have an issue with using the session (same app pool), you can update each site independently (just update the content files in their folders and copy the dll to the MainSite <bin> folder.
Wednesday, April 8, 2009 10:41 PM -
User372121194 posted
Hi,
From your description, I understand that you want to build one sub directory and only update this sub directory on server, right?
If so, you can publish your website with updatable option, then the .compiled files won't be created.
After you build Sales directory with updatable option, please copy the Sales folder contains to root website's Sales directory and copy assembly from Sales directory to root website's bin folder. With this, we don't need to create separate application for Sales directory. New Sales page will load new assembly from root bin folder.
I look forward to receiving your test results.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, April 8, 2009 11:09 PM