locked
Sometimes throws "the class defined in this code file matches the 'inherits' attribute" RRS feed

  • Question

  • User-1466065877 posted

    Hi,

    We have a web application deployed to IIS. However, sometimes, it throws error "Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl)."

    But after showing this error, when we access the application after a few mins. it works again and no error returns.

    May I know when will it occurs and how to solve this problem?

    In our IIS, we set the application pool in AlwaysRunning Start Mode and Idle timeout 20 mins. by default.

    Thanks

    Phc

    Tuesday, July 17, 2018 3:16 AM

Answers

  • User-1466065877 posted

    Hi Abraham,

    We find that it only throws this error when we first compile it. After showing this error, when we refresh the browser, all rights again.

    Finally, I remote to server and use local host to compile it for checking the error. Find out that a hint in stack trace. It mentions another file that support should not be run in first compile. This file inherit our default page class. But this file is not named as default or index these first load filename. Wonder why we only surf default.aspx but system compiles other files and throws error.

    So, we remove the file and system does not show this error again.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 23, 2018 12:17 PM

All replies