Technical support This forum is closed.
Version 1.x > Technical support > Multiple Sites on XP -- main.css View modes: 
User avatar
Member
Member
Norashlea - 2/5/2006 4:00:08 PM
   
Multiple Sites on XP -- main.css
I have multiple sites configured on my XP Prof dev machine, and stop/start depending on the project I'm working on. One of my sites is located within a subfolder of \inetpub\wwwroot.

Using the Web Installer, I've just created a copy of the Corporate site for the new ver. 1.8b so I could have a look at it. I created a separate folder at c:\kentico -- not even located in \inetpub\wwwroot -- created this as a new web, set it as the default (localhost) and installed the sample Corporate site there.

When I run http://localhost -- which is pointing to the new CorporateSite.dll -- the site runs ok, and I can see that it includes features that the previous version sample Corporate sites did not include BUT it seems to be using a combination of styles from main.css that is located at \inetpub\wwwroot\[myotherproject] AND main.css that it is in the new project folder!!!! It also seems to be using specific settings that I have created for FCKEditor at \inetpub\wwwroot\[myotherproject].

Within CMSDesk, it is reporting ver. 1.8.2223, and the CSS that is displayed on the Development tab is the version of main.css that is in the newly created project.

It's very confusing, and I'm not exactly sure what is happening because it looks to be a combination of the two main.css files. For example, main.css at \inetpub\wwwroot\[myotherproject] has a small block graphic that is displayed with each menu item. There is a mouse-over that displays a lighter coloured version of the block graphic. They are created in .CMSMenuItem and .CMSMenuItemMouseUp (and all associated classes) using "background-image:url(/images/nav-bullet_menu.gif);" and "background-image:url(/images/nav-bullet_hover_menu.gif);".

The same classes in main.css that are in the new Corporate project don't have background-image set in the .CMSMenuItem* classes at all.

But when I view http://localhost, the menu items have the same block graphic that is displayed when my default site is set to the project at \inetpub\wwwroot\[myotherproject], but when I mouse-over the menu items, the block-graphic disappears altogether (ie, the mouse-over is hiding nav-bullet_menu.gif but not displaying nav-bullet_hover_menu.gif). When I look at http://localhost in Firefox and view the CSS, it is displaying the main.css file that is located at c:\kentico!!!

Checking c:\kentico\images, there is no file nav-bullet_menu.gif there, so it is definitely displaying the gif that is located at c:\inetpub\wwwroot\[myotherproject]\images.

CMSWebSiteBaseAliasPath in web.config is set to "" and CMSWebAopplicationVirtualPath is "/".

I don't understand what is happening here.

Help????

Sharon.

User avatar
Guest
admin - 2/6/2006 1:24:13 PM
   
Re: Multiple Sites on XP -- main.css
Hi Sharon,

Thank you for your message. I think the most likely reason for this strange behaviors is some caching. Could you please try to clear your cache (IE -> Tools -> Internet Options -> General -> Clear cache, Delete Files), close your browser and open the web site again?

Thank you.

Best Regards,

User avatar
Member
Member
Norashlea - 2/6/2006 7:46:24 PM
   
Re: Multiple Sites on XP -- main.css
Hi Petr,

Yes, this is what I thought at first too, and had done that first, as well as deleting the VSWebCache folder from \Documents and Settings\[account name]. I even completely removed the folder of the project that contained the "offending" styles. It is the weirdest behaviour I've ever seen!

I've decided something has corrupted my IIS installation. I've uninstalled it and I'm just about to re-install and re-setup all the projects.

Regards,

Sharon.

User avatar
Guest
norashlea - 2/6/2006 10:47:45 PM
   
Re: Multiple Sites on XP -- main.css
I think I've figured out some clues about what caused this, but it's still pretty weird (even reinstalling IIS only partially fixed it -- I still have to manually clear the cache sometimes):

Let's say there are 3 projects, and I switch between them as the active site.

A -- (the one that has the main.css that was getting "scrambled" with the others) -- this site uses an index.html intro page, that references main.css in a <link> tag in <head>. index.html is the default start page for this site.
B & C -- these sites have default.aspx as their start page, and load main.css of the respective project.

Sites B and C were created based on A (copying W3SVC/1 and then modifying settings). By default, because they were based on W3SVC/1, the default document was "index.html", even though neither of them contain a file "index.html".

I think that perhaps sites B and C (W3SVC/2 and W3SVC/3) look for "index.html", can't find it in their own home directory, so look to the home directory of the W3SVC/1 -- find it and load the main.css, then continue to load default.aspx of the current site (B or C), which uses the correct main.css.

By deleting index.html from the Documents of sites B and C, the styles scrambling has stopped for site B, but sometimes is still occurring for site C. Will look deeper into what is different about that site later. At least everything is running "almost" normally again.

:o)

Regards,
Sharon.

User avatar
Guest
admin - 2/7/2006 7:55:17 AM
   
Re: Multiple Sites on XP -- main.css
Hi Sharon,

Thank you for your reply. You may need to create the web sites under IIS from scratch instead of copying an existing web site. Unfortunately, I cannot find any better solution for this issue.

Best Regards,

User avatar
Guest
norashlea - 2/7/2006 11:42:11 AM
   
Re: Multiple Sites on XP -- main.css
Hi Petr,

Just to clarify (I probably didn't explain clearly) -- it's not copying the VS project to create another website, it's using adsutil.vbs to create a completely separate root web within IIS in XP Pro:

adsutil.vbs create_vserv W3SVC/#
adsutil.vbs copy W3SVC/1 W3SVC/#

It doesn't copy the files that are located in the home directory of W3SVC/1, just all the settings for the web.

I'd rather develop using XP Pro than Server 2003, and it's just a bit of a hassle not being able to have multiple root sites.

Regards,
Sharon.

User avatar
Guest
admin - 2/8/2006 9:41:45 AM
   
Re: Multiple Sites on XP -- main.css
Hi Sharon,

you may want to use IISAdmin - http://www.firstserved.net/services/iisadmin.php - it allows you to manage multiple web sites on a single XP machine without having to copy anything.

Best Regards,

User avatar
Guest
norashlea - 2/10/2006 8:51:51 AM
   
Re: Multiple Sites on XP -- main.css
Thanks, Petr.

I tried using IISAdmin once before, but couldn't get it to work properly. So I've been using XP Pro IIS Admin from Jetstat (http://www.jetstat.com/iisadmin/). I've found that it doesn't actually create the duplicate sites properly, so I create them manually with the adsutil.vbs script, and then to switch between webs with XP Pro IIS Admin, which has worked well.

I will have another look at IISAdmin.

Regards,
Sharon.