Wordpress server error

Discussion in 'Third-party applications' started by Marcel G, Dec 5, 2019.

  1. I just tried to install Wordpress using the app installer, and following this documentation: https://support.winhost.com/kb/a1214/app-installer-how-to-set-up-wordpress.aspx

    However, when I go to the link provided by the app installer, I get a server error. I set my web.config to show the error, and this is what it shows:

    Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    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: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:
    [FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
    System.Web.Mvc.PreApplicationStartCode.Start() +0

    I'm running a .NET MVC site at the root, and I wanted to add WP as a blog engine underneath that, so I'm installing it to a subfolder.

    Any idea of what this is? My base website is using an older version of MVC (4) with the target framework set to .NET 4. Do I need to upgrade my root site to a newer version of ASP.NET?

    Or should I just try to use WP on a different hosting provider?
     
  2. curtis

    curtis Winhost Staff

    Send in a support ticket and have our team take a look at your account.
     
  3. ComputerMan

    ComputerMan Winhost Staff

    Yes, it's due to web.config inheritance. You need to do the following within the root web.config file: https://stackoverflow.com/a/5968658

    Since your error refers to this: System.Web.WebPages.Razor

    Look for the section in the root's web.config file referring to: system.web.webpages.razor. If the setting is within the system.web section. You need to wrap it around the system.web. Below is just an example.

    Code:
    <location path="." inheritInChildApplications="false">
    <system.web>
    <!-- Reference to system.web.web.pages.razor is here -->
     </system.web>
    </location>
    If you get a new error (Most likely you will.) Then you need to wrap the other section. Do that until the errors stop.
     

Share This Page