Parser Error Message: Could not load type 'Store.WebUI.MvcApplication'.
HejJeg har haft lidt problemmer med et C# script jeg ikke kunne bygge videre på selv, VB er jeg bedre til at forstå end C#, det skal dog siges at jeg ikke arbejder med dette til hverdag KUN fritid.
Så efter at have conventeret C# projektet om til VB så har jeg fået denne fejl.
----------------------
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Store.WebUI.MvcApplication'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="Store.WebUI.MvcApplication" Language="VB" %>
Source File: /global.asax Line: 1
-----------------------
Jeg kan ikke finde noget om den linje i min Global.asax fil, men her er den så I evt. kan tyde hvad der kunne gå galt.
Global.asax
-----------------------
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.Mvc
Imports System.Web.Routing
Imports Store.Domain.Store.Domain.Entities
Imports Store.WebUI.Store.WebUI.Infrastructure
Namespace Store.WebUI
' Note: For instructions on enabling IIS6 or IIS7 classic mode,
' visit http://go.microsoft.com/?LinkId=9394801
Public Class MvcApplication
Inherits Global.System.Web.HttpApplication
Public Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
' Only matches the empty URL (i.e. ~/)
routes.MapRoute(Nothing, "", New With { _
.controller = "Products", _
.action = "List", _
.category = DirectCast(Nothing, String), _
.page = 1 _
})
' Hvilket URL skal laves om og hvad skal det hedde ?page=2 vil i dette tilfælde blive Page2.
' Constraints: page must be numerical
routes.MapRoute(Nothing, "Page{page}", New With { _
.controller = "Products", _
.action = "List", _
.category = DirectCast(Nothing, String) _
}, New With { _
.page = "\d+" _
})
' Matches ~/Football or ~/AnythingWithNoSlash
routes.MapRoute(Nothing, "{category}", New With { _
.controller = "Products", _
.action = "List", _
.page = 1 _
})
' Matches ~/Football/Page567
' Defaults
' Constraints: page must be numerical
routes.MapRoute(Nothing, "{category}/Page{page}", New With { _
.controller = "Products", _
.action = "List" _
}, New With { _
.page = "\d+" _
})
routes.MapRoute(Nothing, "{controller}/{action}")
End Sub
Protected Sub Application_Start()
AreaRegistration.RegisterAllAreas()
RegisterRoutes(RouteTable.Routes)
ControllerBuilder.Current.SetControllerFactory(New NinjectControllerFactory())
ModelBinders.Binders.Add(GetType(Cart), New CartModelBinder())
End Sub
End Class
End Namespace