Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Could not load type
Message
 
To
17/12/2005 23:00:10
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01078889
Message ID:
01079359
Views:
61
This message has been marked as the solution to the initial question of the thread.
Michel,

The Global.asax file needs to be in your application root. The .vb codebehind file goes in the APP_CODE directory. That is if you have a separate .VB file - if you created a new project the global.asax file is self-contained in the actual ASAX files, but VS2003 put the files separate in qhich case you need the code behind file in APP_CODE.

The easiest thing to do probably is: Rename your global.asax file or back it up somewhere and remove it from the project. Then add a new Global.asax from the Add Item menu. Open the file and then fill in the data from your existing class.

The build provider thing should not be necessary and its a design time feature anyway so it doesn't have any effect on a running application. ASAX files have a default build provider.

+++ Rick ---

>>Oh you didn't say this was a conversion.

>>
>>You need to move the code behind class from global.asax into APP_CODE and make sure that the global.asax file references the full type (remove the SourceFile or Codebehind attribute) declared there (MyNamespace.MyGlobalType).
>>
>>If you converted this project using the VS.NET upgrade wizard it should have taken care fo this for you.
>
>Ok, I created the APP_CODE directory and moved Global.asax file into it. By default, when moving it from the interface, it also moved Global.asax.vb which is under Global.asax in the treeview. In Global.asax, I removed the CodeBehind reference. But doing that causes much more error in the designer.
>
>So, this is what I have presently:
>
>Global.asax is located in App_Code directory and contains this:
>
>
><%@ Application Inherits="MFUG.Global" Language="VB"%>
>
>
>Global.asax.vb is located in App_Code directory and contains this:
>
>
>Imports System.Web
>Imports System.Web.SessionState
>
>Namespace MFUG
>
>    Public Class [Global]
>        Inherits System.Web.HttpApplication
>
>        Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires when the application is started
>        End Sub
>
>        Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires when the session is started
>        End Sub
>
>        Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires at the beginning of each request
>        End Sub
>
>        Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires upon attempting to authenticate the use
>        End Sub
>
>        Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires when an error occurs
>        End Sub
>
>        Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires when the session ends
>        End Sub
>
>        Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
>            ' Fires when the application ends
>        End Sub
>
>    End Class
>
>End Namespace
>
>
>The design time error message is:
>
>D:\iis\MFUG\App_Code\Global.asax: ASP.NET runtime error: There is no build provider registered for the extension '.asax'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform