Could not load type 'XXX.Global'

后端 未结 18 1713
萌比男神i
萌比男神i 2020-12-01 07:06

Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this error.

I don\'t actually need Global because I am not adding anything to it, but after I

相关标签:
18条回答
  • 2020-12-01 07:34

    This just happened to me and after trying everything else, I just happened to notice on the error message that the app pool was set to .Net 1.1. I upgraded the app to 2.0, converted to web application, but never changed the app pool:

    Version Information: Microsoft .NET Framework Version:1.1.4322.2490; ASP.NET Version:1.1.4322.2494

    0 讨论(0)
  • 2020-12-01 07:35

    Changing the address's port number (localhost:) worked for me :)

    0 讨论(0)
  • 2020-12-01 07:38

    I've found that it happens when the Global.asax.(vb|cs) wasn't converted to a partial class properly.

    Quickest solution is to surround the class name 'Global' with [square brackets] like so (in VB.Net):

    Public Class [Global]
        Inherits System.Web.HttpApplication
        ...
    
    0 讨论(0)
  • 2020-12-01 07:40

    In my case, I was duplicating an online site locally and getting this error locally in Utildev Cassini for asp.net 2.0. It turned out that I copied only global.asax locally and didn't copy the App_code conterpart of it. Copying it fixed the problem.

    0 讨论(0)
  • 2020-12-01 07:41

    When you try to access the Microsoft Dynamics NAV Web client, you get the following error. Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 This error can occur when there are multiple versions of the .NET Framework on the computer that is running IIS, and IIS was installed after .NET Framework 4.0 or before the Service Model in Windows Communication Foundation was registered.

    For Windows 7 and Windows Server 2008, use the ASP.NET IIS Registration Tool (aspnet_regiis.exe,) to register the correct version of ASP.NET. For more information about the aspnet_regiis.exe, see ASP.NET IIS Registration Tool at Microsoft web site.

    try this solution https://www.youtube.com/watch?v=LNwpNqgX7qw

    0 讨论(0)
  • 2020-12-01 07:43

    The reason I encounter this issue is because I change the build configuration. When I set a web project to x86, it changes the output path to bin\x86\Debug. However, the output path should be bin and the web server won't find the binaries because of this.

    The solution thus is to change the output path of the website back to bin after you change the build configuration.

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