Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brett Spencer 11 posts 32 karma points
    Jun 24, 2014 @ 16:03
    Brett Spencer
    0

    Copy site from production to localhost all pages not formatted.

    This started out with all pages throwing 404 error. I am leaving the post as is to show my process...

     

    I have spent 12 hours on this so far and the deadline is fast approaching.  I have been tasked with taking an existing site that does not have the correct development environments and create some .Net Macros. I do not have access to the production environment and need to develop locally. I have been to every link possible to figure out the following issue and even looked at this post here, http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/50194-Deployed-site-throws-404-on-static-content, in the forum and followed all of the permissions and AppPool permissions but to no avail. Without knowing where to look I am at a dead end.

    To start, the site Directory was copied for me as well as a backup database from the production server and I am loading it into my localhost.  The version is 4.10.1.

    I have gone through the whole install step-by-step. The first error I encountered was some 64bit encoding error, umong others... after overwriting all of the umbraco core files with clean files from Umbraco's download page - keeping only the media and css that make up the site and pointing the web.config to the database, I was able to log into the administrative side and can see all nodes and content.  So I republished the whole site yet I get a 404 error for EVERY single page. Why is this happening?

    EDIT....

    It's been about 5 minutes since I posted and took all of the files from the original copied directory and overwrote the wwwRoot/Directory with them.  I tried again and got a "security token" error. After republishing the entire site again, I can see the pages but the css, formatting, and pictures.

    Fiddler: Shows 404 errors for all of the /media/, /scripts/, and css/ directories...?

    I don't know where to look or what to do next.  If anyone has any idea... Please help... Thank you

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 24, 2014 @ 16:27
    Jan Skovgaard
    0

    Hi Brett and welcome to our :)

    So you have got files and database and you're now trying to get it to run on your local host.

    In order to make it run you need to make sure that all required dependencies are setup and installed correctly on your own machine then. You can check the dependencies here http://our.umbraco.org/documentation/Installation/system-requirements - and make sure to check the permission settings as well.

    I think you should also try to delete the temp folder in /app_data/TEMP. After doing so do this 1: Go to /config/ClientDependency.config and increment the version number 2: Recycle the app pool / touch the web.config

    Does that help?

    If you can login to Umbraco also make sure to rebuild the Examine indexes by going to "Developer" and choosing the "Examine" dashboard on the right (top).

    Hope some of these pointers help.

    /Jan

  • Brett Spencer 11 posts 32 karma points
    Jun 24, 2014 @ 16:49
    Brett Spencer
    0

    I followed each step. I checked the site and still no formatting... I noticed the "Content & Media 'Path' Fix and ran it, but now it get..

    Invalid length for a Base-64 char array or string.

    Stack Trace:

    [FormatException: Invalid length for a Base-64 char array or string.]
       System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) +14390795
       System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +162
       System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length) +116
       System.Web.Security.FormsAuthentication.Decrypt(String encryptedTicket) +167
       Umbraco.Core.StringExtensions.DecryptWithMachineKey(String value) +235
       umbraco.BasePages.BasePage.get_umbracoUserContextID() +241
       umbraco.BusinessLogic.User.GetCurrent() +9
       umbraco.presentation.LiveEditing.DefaultLiveEditingContext.get_Enabled() +49
       umbraco.presentation.UmbracoContext.get_LiveEditingContext() +136
       __ASP.FastObjectFactory_app_web_default_master_a29f75f4_tiuejsgf.Create_ASP_umbraco_masterpages_default_master() +40
       System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +322
       System.Web.UI.MasterPage.ApplyMasterRecursive(MasterPage master, IList appliedMasterFilePaths) +77
       System.Web.UI.MasterPage.ApplyMasterRecursive(MasterPage master, IList appliedMasterFilePaths) +12405274
       System.Web.UI.Page.PerformPreInit() +211
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844
    

    This was the same error that I started with... I'm testing in Chrome and IE... It only seems to be throwing it in IE... IE definitely wasn't cached before the error...

  • Brett Spencer 11 posts 32 karma points
    Jun 24, 2014 @ 16:55
    Brett Spencer
    0

    I should mention that this is a multi-lingual site... I'm noticing that when clicking on the different language version, it is not directing me to the correct language.

     

    So, I restored the database from the Content Edit Utility and put the TEMP folder back the way it was. No change... No formatting, and IE doesn't work.

    UPDATE: 

    I changed all of the 'href="/' links to 'href="../' in all of the masterpages.  Now I'm getting my layout but my NONE of my Navigation works. (No links, no dropdowns) AND IE still Doesn't work... has the Base-64 char array string length error.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 24, 2014 @ 19:21
    Jan Skovgaard
    0

    Hi Brett

    Has there been done any custom API integration using the Umbraco API's or some 3rd party API?

    There can be a number of reasons why it does not direct you to the proper language. Have you setup the different IIS bindings for each of the sites? If not then that's perhaps why.

    The TEMP files should just be regenerated if the folders have been removed. Having TEMP files from the live environment on your local environment can mess things up. But the TEMP folder should not be delted. Only the folders inside it.

    Have you checked the trace log in /app_data/logs to see if it provides further information?

    /Jan

  • Brett Spencer 11 posts 32 karma points
    Jun 24, 2014 @ 19:58
    Brett Spencer
    0

    Let me thank you first for your help.  I am looking into everything that you have pointed out...

    The first problem I need to tackle is one that hasn't yet been clear.  

    Problem: I am not getting any of my page resources to download because of the way the links are generated.

    Configuration: IIS 7.5, running an application under the default site so my url would look like this: localhost/mysite

    When running Fiddler... I can see that my css is loaded with the following url: /mysite/css/file.css. So I imagine that my scripts to run my navigation and the urls for my images should also have the '/mysite/' directory first but it doesn't.

    So in comparison... 

    I see this:  /media/267/img.jpg

    I need to see this:/mysite/media/267/img.jpg

    Why does it work on production but not local?

  • Brett Spencer 11 posts 32 karma points
    Jun 24, 2014 @ 20:56
    Brett Spencer
    0

    I just recreated the site as it's own application under the iis server and created a (local) domain name in the host name and added the host name in the hosts file.  Now all seems to be working.

Please Sign in or register to post replies

Write your reply to:

Draft