Could not load type 'WebApp1._Default' in ASP.NET

前端 未结 6 1594
清酒与你
清酒与你 2020-12-10 15:26

When I am running my ASP.NET application I will get an error

Server Error in \'/\' Application.

Parser Error Description: An error occurred during the

相关标签:
6条回答
  • 2020-12-10 16:05

    Please try under "Project Settings/Build" set OutputPath to "bin\" not "bin\debug". this was my problem.

    0 讨论(0)
  • 2020-12-10 16:16

    For me somehow the code-behind file got removed from the project. They showed up with a different icon in the solution explorer. I just had to expand the ASPX line to see the code behind and then right-click and add it to the project.

    0 讨论(0)
  • 2020-12-10 16:20

    have you set your web app directory as application in IIS?

    I have seen this error many times for different reasons.

    1. Check namespace
    2. dependent dll versions
    3. Visual studio clean and compile again.
    4. clean temp asp.net files "Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"
    0 讨论(0)
  • 2020-12-10 16:21

    Did you rename the namespace or class name in the code-behind file? Open the code-behind file and verify that the namespace for the page is called WebApp1 and that the class is called _Default, or update the Inherits-attribute in the aspx page header to fit the code-behind.

    0 讨论(0)
  • 2020-12-10 16:21

    Have you specified your _Default class is under the namespace WebApp1 in Default.aspx.cs file ?

    Please check.

    0 讨论(0)
  • 2020-12-10 16:26

    Check your DLL is in the bin folder. (Not bin/debug...).

    0 讨论(0)
提交回复
热议问题