Copied to clipboard

Flag this post as spam?

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


  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    **URGENT** my website is unavailable for few days after trying to upgrade from 7.15.6 to 8.1.0

    Hi, I tried to upgrade last week my website from 7.15.6 to 8.1.0

    I used FileZilla to copy /bin and /Umbraco to my host. Then, I edited the web.config as explained here: https://our.umbraco.com/documentation/Getting-Started/Setup/Upgrading/migrating-to-v8

    The installation process didn't start and my website is unavailable since last week.

    When I tried to rollback to 7.15.6, I now get the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: The type 'Umbraco.Web.UmbracoApplication' is ambiguous: it could come from assembly 'D:\home\site\wwwroot\bin\umbraco.DLL' or from assembly 'D:\home\site\wwwroot\bin\Umbraco.Web.DLL'. Please specify the assembly explicitly in the type name.

    Source Error:

    Line 1: <%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %> Line 2:

    Source File: /global.asax Line: 1

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4261.0

    I copied again /bin and /Umbraco to my host (of 7.15.6), as well as the config and App_Plugins folders

    How can I bring my website back???

    Thakns.

  • Nicholas Westby 1985 posts 6777 karma points c-trib
    1 week ago
    Nicholas Westby
    0

    Maybe you need to delete a DLL (or several)?

    First of all, back up your files, including your bin folder. You should also back up your database while you're at it (if you haven't already done so).

    Next, try a fresh install of Umbraco 7.15.6 on your local machine. Compare those DLL's to the ones on your website. Delete the ones you think may not be appropriate.

    You will probably want to do the same for other folders, such as the umbraco folder.

  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    Hi Nicholas, Thanks.

    So actually I just copied back U7's /bin /umbraco and /UmbracoClient folders. I also copied U7's /AppPlugins and /Config

    So I assume I only have U7's dll? Are there any other places / folders where U8's dll's can be found?

  • Patrick van Kemenade 63 posts 257 karma points
    1 week ago
    Patrick van Kemenade
    0

    Think that you have 2 umbraco versions in your bin or a server side caching issue.

    Think in Umbraco 8 you only have a Umbraco.Web.DLL which is relativly big (> 2 MB) and no Umbraco.dll. On Umbraco 7 you have both but the Umbraco.Web.dll is then very small (< 50 kb).

    First do as Nichalas suggest a backup.

    Then delete everything inside your App_Date folder.

    Also when publishing your solution do you delete everything upfront ?

    Also did you do a IISRESET (or stop/start of your virtual directory), or a quick edit of web.config (forcing an IIS RESET).

    Also make sure you connect to a previous versus 7 of the database. And in the web.config the add key="Umbraco.Core.ConfigurationStatus" to the correct value.

    Hope this helps.

    Also in the future also try to setup a test.mysite.com (with basic authentication to prevent indexing from google) to test things so you then just can swap the test and live website without risk or downtime > 1 min.

  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    Hi Patrick, I'm using Azure - how can I resolve the server side caching issue?

    I didn't find Umbraco.Core.ConfigurationStatus in my web.config, nor in a web.config when download U7.15.6

    I deleted the whole bin folder and copied a new bin folder of U7

    Thanks

  • Tim Geyssens 6561 posts 15372 karma points MVP 2x c-trib
    1 week ago
    Tim Geyssens
    0

    do you have a backup? Maybe ask hosting comp to restore?

  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    I have backup of the database

    I'm using Azure - very hard to communicate with them ... Before I was in winhost, much better tech support ...

  • Nicholas Westby 1985 posts 6777 karma points c-trib
    1 week ago
    Nicholas Westby
    0

    Can you confirm that you've deleted the existing bin folder before copying just Umbraco 7 DLL's over? Also, can you confirm that you are getting the same error after doing so? Where did you get your Umbraco 7 DLL's?

    I have an Umbraco 7 website I'm looking at right now and I do not see an Umbraco.Web.dll file in the bin folder. I see Umbraco.Web.UI.dll, but not Umbraco.Web.dll. That makes me think you still have some Umbraco 8 stuff left over that you have not deleted.

  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    Hi, Update: Yesterday, following you and Patrick answers I deleted the /bin folder and copied again (I downloaded 7.15.6 , unzipped and copied the /bin /umbraco and /umbraco_client again).

    I'm able now to log in to the back office (mydomain.net/umbraco) However, it complaints now on the code. Seems it expects the code to be a U8 code.

    What else I need to change in order that it will be back to 7?

    Thanks again

  • Patrick van Kemenade 63 posts 257 karma points
    1 week ago
    Patrick van Kemenade
    0

    The content of the App_Data folder (first backup to be sure) contains cached things (and log files and model), so I would clear this because it gets regenerated.

    Not sure which AppModel mode you are using (check settings in web.config) because it can be also generated for Umbraco 8, but if you can login to the backend you can regenerate it there.

    Also you can check the log for the specific error your now getting. Also Right clicking on the Visual Studio solution and do a clean solution might help getting rid of some old stuff.

    Also do you have everything in 1 project or does your solution consist of mulitple project, if so are all other project converted back to 7 as well ?

  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    Hi Patrick, thanks.

    The content of the App_Data folder (first backup to be sure) contains cached things (and log files and model), so I would clear this because it gets regenerated.

    Is it safe to clear AppData on the server? Yes, I created a backup. I just want to ensure that it will not create more errors / problems ... I see many folders under AppData on the server

    1. I was searching for AppModel in web.config but didn't find

    2. I'm not using visual studio for this specific website. All my views / scripts are within the CMS. I write the code (html / C#) direct from the CMS back office.

    3. It's a one website that hosts on Azure. So pretty much as I mentioned above (3) I just write the html/css/c# using the back office, and that's it. If I need to change something in the website's code I do it through the back office.

    Thanks.

  • Tim Geyssens 6561 posts 15372 karma points MVP 2x c-trib
    1 week ago
    Tim Geyssens
    0

    if backups are setup you should be able to do it from the portal https://docs.microsoft.com/en-us/azure/app-service/web-sites-restore

  • Meni 155 posts 177 karma points
    1 week ago
    Meni
    0

    Hi Tim, thanks. I just checked on my Azure portal and it says: Backup is not configured. Click here to configure backup for your app.

  • Meni 155 posts 177 karma points
    3 days ago
    Meni
    0

    Hi, After following the answers in this thread I'm able now to access again the back office (mywebsite.net/umbraco), however, my website is still unavailable.

    This is the error I'm getting now (I also tried to run it locally using Visual Studio 2017, by install U7.15.6 using nuget, and also on local I get the same error):

    The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])'

    Source Error:

    Line 20:    var section_node = Umbraco.Content(1xxx);    
    Line 21:    var Section_pagesToList = @Section_node.Children.Where("Visible");
    Line 22:    Section_pagesToList = Section_node.DescendantsOrSelf().Where("NodeTypeAlias == @0", "NewsPage");
    

    So what I did, I changed Line 21 as follow:

    string[] Section_pagesToList = @Section_node.Children.Where("Visible");
    

    But now I'm getting another error in other part of the page - where I display the feature image of this section:

    Line 81:                <div class="col-xl-6 col-lg-6 col-md-4 MainNewsBox">
    Line 82:                    <figure>
    Line 83:                        @if (Section_pagesToList.Last().HasValue("articleImg"))     
    

    The error in line 83 is:

    Compiler Error Message: CS1929: 'string' does not contain a definition for 'HasValue' and the best extension method overload 'PublishedContentExtensions.HasValue(IPublishedContent, string)' requires a receiver of type 'IPublishedContent'
    

    What to do?? My website is unavailable for almost two weeks. It's an online magazine and I have advertisers that running advertising campaigns on my website. They pay for banners and their banners are not shown as the website is unavailable. How can I bring it back? I just tried to upgrade to U8 and now I can't bring my website back.

    Thanks (again) for your help

  • Nicholas Westby 1985 posts 6777 karma points c-trib
    3 days ago
    Nicholas Westby
    0

    Can you share the entire contents of the CSHTML file you're having an issue with? What you've shared so far doesn't make a lot of sense to me. For example, the first error message mentions the function Umbraco.Web.UmbracoHelper.Media().

    The problem with that is that your line 21 does not using the .Media() function. Line 20 does use .Content(), but not .Media(). So I'm curious if it was actually line 20/21 that had that error, or if it was some other line.

    Secondly, I'm not sure why you would use string[] as the data type for this line:

    string[] Section_pagesToList = @Section_node.Children.Where("Visible");
    

    That should return a IEnumerable<IPublishedContent> rather than string[], so the var should have been fine to use.

    While it probably doesn't matter, I see no need for the at sign in @Section_node. It might be necessary if you called the variable @Section, but not for Section_node.

    The HasValue error is clearly because you used string[] as the data type.

    If you share the contents of the file, that'd probably go a long way toward figuring things out.

    It would also be useful if we could see your web.config, but you'd want to scrub any sensitive details (e.g., SQL connection string credentials). And be sure it's your actual web.config from production, rather than your local copy.

  • Meni 155 posts 177 karma points
    3 days ago
    Meni
    0

    Hi Nicholas, Thanks for your help.

    The reason I did string[] Section_pagesToList is because of the first error message:

    The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])' Description:
    

    "Can you share the entire contents of the CSHTML file you're having an issue with?"

    This is the entire file: https://github.com/Menachem35/Opli-Umbraco-Magazine-Template/blob/master/Partial%20View%20Macro%20Files/HPPhotonicsLasers.cshtml

    And this is the other scripts also: https://github.com/Menachem35/Opli-Umbraco-Magazine-Template/tree/master/Partial%20View%20Macro%20Files

  • Meni 155 posts 177 karma points
    3 days ago
    Meni
    0

    For some reason the links getting broken. You can see in this link in the Partial View Macro Files/ folder https://github.com/Menachem35/Opli-Umbraco-Magazine-Template/

    The file is: HPPhotonicsLasers.cshtml

  • Nicholas Westby 1985 posts 6777 karma points c-trib
    3 days ago
    Nicholas Westby
    0

    I see a number of calls to Umbraco.Media in the HP_Photonics_Lasers.cshtml file, but this line (line 31) is the only one without a null check:

    <img src="@Umbraco.Media(feature_story_HP.articleImg).Url" alt="@feature_story_HP.photoAlt" class="img-fluid news-img" />
    

    Maybe add a null check and see if that helps.

    Also, if you know the return type of statements like feature_story_HP.articleImg, you can cast it to be more explicit so the call is not ambiguous. For example, you could change the above line to something like this:

    <img src="@Umbraco.Media((int)feature_story_HP.articleImg).Url" alt="@feature_story_HP.photoAlt" class="img-fluid news-img" />
    

    Or, if you know it's a string, it'd be more like:

    <img src="@Umbraco.Media(feature_story_HP.articleImg as string).Url" alt="@feature_story_HP.photoAlt" class="img-fluid news-img" />
    

    You could temporarily delete the problematic lines and output some debugging code for testing purposes. For example, you could comment out the above line and write something this to get the data type (I don't have an IDE open, so the property may be something else, such as FullName):

    @feature_story_HP.articleImg.GetType().Name
    

    In the case of null, that'd throw an exception, which would also be useful information to assist with troubleshooting.

    Good luck.

  • Meni 155 posts 177 karma points
    1 day ago
    Meni
    0

    Thanks for your help Nicholas

  • Meni 155 posts 177 karma points
    1 day ago
    Meni
    0

    * UPDATE * My website is back in the air.

    What I did is, I downgraded to 7.11, 7.8, then upgraded again to 7.15.6 and somehow my website is back in the air again.

    It was very frustrating, but finally my website is again in the air, online.

    What I learned from this experience?

    Now on when I upgrade to a version with a major change - for example, 7 to 8, I'll first do it locally on my machine, then only when verifying locally that everything is working, only then deploy to production (I used to do everything until now on direct production... - yeah yeah, I know, very unprofessional, but you know how it is, when it's not work and only my personal website, I didn't really follow the "rules" ... - I guess there's a (good) reason for why and how to do things in the right way)

    Maybe I'll even create another environment, something like - test.mywebsite.net so I can deploy first to test, then if everything is working, to production.

    I also think to try create a pipeline, maybe with gitlab or something where instead to update the code on umbraco back office, to have a local git repository, to push to remote, then create kind of automation. But I need to check it.

    Thanks again for all the help.

Please Sign in or register to post replies

Write your reply to:

Draft