locked
How to deploy a global Theme RRS feed

  • Question

  • User-1937378318 posted

    Hi all,

    My question is really quite simple. How to I get a web deployment project to copy files to a directory under the default root but NOT in my application folder? Let me explain real quick with some specifics.

    I have a theme for my ASP.NET 2.0 web applications and I want all applications on the server to use the same theme. Of course I don't want the files for the theme to be copied to every virtual directory/application because that would mean I have too maintain multiple copies of the theme and that is a maintenance night mare. Of course, the is an easy way to make a theme available to all applications in a web site. I just have to copy the files to the directory where IIS looks for them and that directory is:

     %IISDefaultRoot%\aspnet_client\system_web\2_0_50727

    I just need to create a folder called Themes in the above directory and then copy my theme files into that directory. All the theme files are in one directory and the name of that directory is the name of the theme. So if I want a global theme call MyFirstTheme I need to place my style sheet and skin into the following directory

     %IISDefaultRoot%\aspnet_client\system_web\2_0_50727\Themes\MyFirstTheme

    IIS looks for a theme in  %IISDefaultRoot%\aspnet_client\system_web\2_0_50727 and if it can't find a theme called MyFirstThem there it looks in the applications dfirectory for a App_themes folder. If the MyFirstTheme is not found there either you get an error.

    That was all pretty straight forward until I started building my web deployment project. I could not and still can't figure out how to set up a folder using the File System Viewer that will copy the theme to the directory shown above. The best I could do was to copy the file to the application directory, which is of course wrong. I tried using a custom folder and a default location of [TARGETDIR], which I thought was set to the default website folder C:\Inetpub\wwwroot\ or D:\Inetpubwwwroot depending on which drive is used for the web site. But that did not work either. It seems [TARGETDIR] is set to the application directory because when the install finished my theme was located in

      %IISDefaultRoot%\MyApplication\aspnet_client\system_web\2_0_50727\Themes\MyFirstTheme

     Does anyone know how to do what I am trying to do?

    I posted in the Master Pages, 'Themes and Navigation Controls' forum yesterday, but have received only one reply which was incorrect. I am hoping I'll have better luck getting an answer from this forum, since my problem is really more of a deployment issue.

     I look forward to your reply

    TIA

    URW [*-)]

    Thursday, October 18, 2007 1:42 PM

Answers

  • User1001789087 posted

     Create a batch file that does it, and get your deployment project to call the batch file.

    (a .bat file).

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 18, 2007 2:42 PM

All replies

  • User1001789087 posted
    If you have a global theme, you cannot have the same theme registered in your applications theme directory. If you do, it will always take your application theme.


     

     

     

    Thursday, October 18, 2007 2:19 PM
  • User-1937378318 posted

    I know that.

    What I don't know is how to deploy to the global theme directory <IISDefaultRoot>\aspnet_client\system_web\2_0_50727\Themes using a Web Deployment project.

     URW

    Thursday, October 18, 2007 2:39 PM
  • User1001789087 posted

     Create a batch file that does it, and get your deployment project to call the batch file.

    (a .bat file).

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 18, 2007 2:42 PM