After converting some breeze API from C# code to VB.NET, WebActivator
throws Server Error in '/' Aplication
when I run my project with the message:
The type DevCentralBreeze.HotTowelRouteConfig doesn't have a static method named RegisterHotTowelPreStart
I think I coded everything right - there is a static member, but WebActivator can't find it.
Does anyone know how I can get WebActivator
to recognize this? Maybe some config issue?
Imports System.Web.Http
<Assembly: WebActivator.PreApplicationStartMethod(GetType(BreezeWebApiConfig), "RegisterBreezePreStart")>
Public Class BreezeWebApiConfig
Public Shared Sub RegisterBreezePreStart()
GlobalConfiguration.Configuration.Routes.MapHttpRoute(name:="BreezeApi", routeTemplate:="api/{controller}/{action}")
End Sub
End Class
Looks like your error is not related to the piece of code that you've posted.
The error refers to
HotTowelRouteConfig
class and missingRegisterHotTowelPreStart
method. Your code showsBreezeWebApiConfig
class withRegisterBreezePreStart
(This is not the method you're looking for... ;-).