Copied to clipboard

Flag this post as spam?

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


  • mauzilla 19 posts 90 karma points
    Mar 09, 2021 @ 07:58
    mauzilla
    0

    HTTP Error 500.19 - Internal Server Error trying to setup a dev from production site

    I'm fairly new to c# and umbraco but have ample MVC experience in other languages. I've been tasked to make some minor changes to an existing Umbraco 8 site and have given access to the current production site and database.

    I have setup the application in IIS (10), imported the database, setup permissions for IIS_IUSRS but getting an annoying HTTP Error 500.19 which is not descriptive at all:

    HTTP Error 500.19 - Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid.
    
    Detailed Error Information:
    Module     IIS Web Core
    Notification       Unknown
    Handler    Not yet determined
    Error Code     0x8007000d
    Config Error       
    Config File    \\?\D:\home\testsite\web.config
    Requested URL      http://localhost:8051/
    Physical Path      
    Logon Method       Not yet determined
    Logon User     Not yet determined
    
    Config Source:
       -1: 
        0: 
    
    More Information:
    This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
    View more information ยป
    

    If I remove all content from the web.config file, the the -1 dissapears, so it appears that this is not a permissions issue that IIS cannot read the files.

    Further to this, if I run the application through Visual Studio debugger, it works (albeit it says I need to run the previous build) but it does atleast run the site completely.

    The only changes I made was the database credentials in the web.config, but even with the base web.config there is no difference, and as the Config Source appears to be missing I have no idea how to debug this.

    Any ideas?

  • mauzilla 19 posts 90 karma points
    Mar 09, 2021 @ 08:09
    mauzilla
    0

    It has to be something in the web.config file as if I replace it with another web.config from another site (just to test / debug), my error is completely different (as expected as it's 2 different applications altogether).

    Unfortunately there is nothing obvious indicating what the issue can be?

  • mauzilla 19 posts 90 karma points
    Mar 09, 2021 @ 08:14
    mauzilla
    0

    Found the issue to be in the following code:

    <rewrite>
          <rules>
            <rule name="HTTPS_Rewrite" stopProcessing="true">
              <match url="(.*)"/>
              <conditions>
                <add input="{HTTPS}" pattern="^OFF$"/>
              </conditions>
              <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}"/>
            </rule>
          </rules>
        </rewrite>
    

    I doubt this to be the fault of Umbraco as this seems to be added manually. I have removed this from my code and I am now able to access the server. I will further make an assumption that this is related to a rewrite rule (maybe my local IIS does not have the neccesary modules enabled to perform rewriting)?

Please Sign in or register to post replies

Write your reply to:

Draft