New deployment - cannot find skin error

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
1/12/2012 8:56:56 AM
Gravatar
Total Posts 133
J

New deployment - cannot find skin error

I have a problem getting a new deployment of the latest MoJo running on our development server. Latest MoJo running .NET4 on IIS6 W2003 MSSQL.

The site loads fine in VS2010 locally accessing the same database.

When trying to access the deployed version I get redirected to a generic error page and in the serverlogs I see this

Exception information:
Exception type: HttpException
Exception message: Theme 'default1artisteer31-orangecream' cannot be found in the application or global theme directories.
at System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(String themeName)
at System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(HttpContext context, String themeName)
at System.Web.UI.Page.InitializeThemes()
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I have checked and rechecked the folders and permissions. In the database MP_Sites.skin is artisteer31-orangecream - so where is that default1 prefix coming from? I have a site 2 and it gives a similar error that is cannot find slink default2artisteer31-business2

Not sure where to look now -  the skins in question are in folders under data/sites/1/ etc..

Cheers

John

1/12/2012 9:40:50 AM
Gravatar
Total Posts 133
J

Re: New deployment - cannot find skin error

Further note we are on Mojoportal 2.3.7.7 - it occurs to me that we may have pulled the wrong one from Hg

1/12/2012 10:03:14 AM
Gravatar
Total Posts 18439

Re: New deployment - cannot find skin error

tell more about how you deployed it.

see my documentation which explains how I prepare a package for deployment.

make sure you deployed a release build and set compilation debug="false" in web.config

make sure the skin files are getting deployed, if you are deploying over an existing site you may need to copy the skins from /Data/skins to /Data/Sites/[SiteID]/skins

you've pulled a newer version but it should be fine

we use a virtual path provider (VPP) to load the theme.skin file from the skin folder rather than from /App_Themes

default1artisteer31-orangecream is a fake theme name that it should try to load from /App_Themes but our VPP should load it form the skin folder and just use that as the cache key

however VPP doesn't work in medium trust under .NET 3.5, are you sure you are using .NET 4, it should work there.

1/12/2012 10:38:37 AM
Gravatar
Total Posts 133
J

Re: New deployment - cannot find skin error

Thanks Joe

The only thing there that doesn't match up is that we had not changed the debug line in web.config - done that and redeployed but no change. We are on .NET4 and fulltrust - its our own server, the skin files exist in both places and their permissions are correct..

I cannot explain the deployment method - way beyond my understanding -  my colleague Matthew will be along shortly to explain that but he's busy on something else right now. - it is different from the manual deployment we use for our other Mojo installation.

Cheers

John

1/13/2012 4:08:38 AM
Gravatar
Total Posts 4

Re: New deployment - cannot find skin error

Hi Joe,

We are using TeamCity with an MSBuild file to automatically build and publish the solution to our web directory when we commit any code changes to our SVN. It has been done this way as John is skinning the site and I will be coding some custom modules for it. The solution does run when we run it in Visual Studio. It is building with its Release configuration, Debug is set to false in the Compilation tag in the web.config and the skins it is trying to load exist in both /Data/skins/ and /Data/Sites/[x]/skins. As John stated, it is running under .NET 4.0 and in Full Trust.

I have also done the following clean-up as recommended in your Packaging and Deployment guide:

  • Deleted currentlog.config and test.config from /Data/
  • Deleted test.config from /Data/[x]/
  • Made sure there is nothing in /Data/[x]/systemfiles/ (in fact this folder does not exist at all)
  • Deleted /obj/ from the web root

When I first launched the website it took me to the setup page and get the following which indicates that everything is ok:

Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema is up to date.
2 site(s) found.
Configuring feature Html Content - 00:00:00.9531311
Configuring feature Site Statistics - 00:00:01.0468817
Configuring feature Child Page Site Map - 00:00:01.0468817
Configuring feature Newsletter Sign Up Form - 00:00:01.0468817
Configuring feature Sign In Module - 00:00:01.0625068
Configuring feature Bing Map - 00:00:01.1093821
Configuring feature Blog - 00:00:01.1875076
Configuring feature Contact Form - 00:00:01.2656331
Configuring feature Event Calendar - 00:00:01.3125084
Configuring feature Feed Manager - 00:00:01.3593837
Configuring feature Flickr Slide Show - 00:00:01.4062590
Configuring feature Flickr Gallery - 00:00:01.4062590
Configuring feature Image Gallery (Simple Folder Version) - 00:00:01.4218841
Configuring feature Forums - 00:00:01.4531343
Configuring feature Google Map - 00:00:01.4843845
Configuring feature Google Translate - 00:00:01.5000096
Configuring feature Html Fragment Include - 00:00:01.5156347
Configuring feature IFrame - 00:00:01.5156347
Configuring feature Image Gallery - 00:00:01.5312598
Configuring feature Audio Player - 00:00:01.5625100
Configuring feature Video Player - 00:00:01.5625100
Configuring feature List/Links - 00:00:01.5937602
Configuring feature Live Messenger Chat - 00:00:01.6406355
Configuring feature Poll - 00:00:01.6562606
Configuring feature Shared Files - 00:00:01.7031359
Configuring feature Survey - 00:00:01.7187610
Configuring feature Twitter Profile Widget - 00:00:01.7343861
Configuring feature Twitter Search Widget - 00:00:01.7343861
Configuring feature Web Store - 00:00:01.7656363
Configuring feature Xml/Xsl - 00:00:01.7812614
Ensuring all features are installed in server admin sites... - 00:00:01.7968865
Setup is complete, click the link below to go to the home page.
Site Home Page

Database PlatformMSSQL
Version2.3.7.7
StatusYour installation is up to date.

-----

Not sure what else to try. Are there any other directories that should not be published?

Thanks in advance for any help,

Matthew

1/13/2012 6:28:58 AM
Gravatar
Total Posts 133
J

Re: New deployment - cannot find skin error

Further update

To rule out any issues with Matthew's deployment vis TEAMCITY I did a build on my PC the same way I do with our other mojo installation which is 2.3.7.1 BTW. Built and deployed locally to disk, zipped and uploaded and installed. The error is now different for site1

Exception information:
Exception type: HttpException
Exception message: The directory '/App_GlobalResources/' is not allowed because the application is precompiled.
at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Compilation.BuildManager.CallAppInitializeMethod()
at System.Web.Hosting.HostingEnvironment.Initialize

Which seems odd as we are using the source from hg. It looks like we must have setup the code wrong somehow.

Accessing site 2 still gives the error on default2[skinname] error

!stumped

1/13/2012 8:19:05 AM
Gravatar
Total Posts 18439

Re: New deployment - cannot find skin error

Hi John and Mathew,

I'm stumped too. The only suggestions I have is get the latest code from the repository again and make sure you are getting the code using TortoiseHG and not the download links on codeplex as people often report weird things when they get the code that way.

John, you mentioned on another thread that you make changes to the code, after getting the latest code I would test it first before applying any customizations to the code.

Hope that helps,

Joe

1/13/2012 8:31:23 AM
Gravatar
Total Posts 4

Re: New deployment - cannot find skin error

Cheers Joe,

We did get the latest from Hg. Looks like we have a bit of a mystery here. I'll try getting the code again. As far as I'm aware no changes to the core mojo code has been made. I'm mucking about publishing code from Visual Studio and getting all sorts of weirdness but I'm sure we'll get there. I will update this thread if I find a solution.

It's a bit odd as this is our third mojo deployment and we have not run into any problems like this before. I'm just trying to go back to see what we have done differently apart from working with the latest code from Hg

Thanks again,

Matthew

1/13/2012 8:34:36 AM
Gravatar
Total Posts 4

Re: New deployment - cannot find skin error

For clarification, the errors I am getting now appear to be .NET weirdness.

And... As I was typing this it just worked Undecided Right, now I just have to get team city to build things exactly how I just built them.

Over and out

1/28/2012 9:06:03 AM
Gravatar
Total Posts 9

Re: New deployment - cannot find skin error

Hi

I too have been plagued with this bug.  After hitting my head on the desk I found that removing "App_global.asax.compiled" from the deployed Bin directory it all worked.  Still not sure why as am just starting out with web dev and mojo portal ( which I love btw)

For info I got the latest source using M$ web matrix, then opened the project in VS 2010.    I then used 'published web site' to a local IIS and configured it all correctly I think.  The setup ran with no problems etc.  However, I always got this skin error.  My hosting provider is winhost and they can deploy mojoPortal for you which I tried and it worked, but it's a slightly older version, so I copied my locally deployed IIS to my domain hosting - guess what - still a problem, until I removed this file from the bin directory.

Note, this always worked whilst running via webmatrix & debug via VS, it was only when I ran under IIS 7.5

So, that problem sorted, my next is on another thread Cry

Thanks

Danny

1/28/2012 10:12:22 AM
Gravatar
Total Posts 18439

Re: New deployment - cannot find skin error

Hi Danny,

The problem is that you should not "publish". mojoPortal is a web application project type not a web site project, the packages on codeplex are already compiled and ready for deployment, they have no C# source code, re-publishing them messes it up.

When you open the deployment files in WebMatrix or VS its treating it like a web site project rather than a web app which is what the actual source code is. And when you publish it is further compiling it into a pre-compiled web site. The problem with that is that VirtualPathProviders do not work in pre-compiled web sites, therefore the VirtualPathProvider we use to map the the theme.skin file from the skin folder does not work and therefore skins don't work.

There is a kind of hacky way to solve that problem as discussed on this thread but, the hacky solution won't work in medium trust hosting which most hosts use.

To work with mojoPortal in Visual Studio it is best to get the source code rather than try to use the already compiled deployment packages for development.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.