Base solution for your next web application

Activities of "mysterio21troy"

Hi Support,

Trying to implement OData into the .NET Core ASPNETZERO project as per documentation: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/OData-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a>

But get the following error: This method cannot be called during the application's pre-start initialization phase.

It seem's the instructions are out of date for .NET Core, can someone please help or advise what to do here? I assume it may be the implementation that is similar to signalr? Something similar to this? <a class="postlink" href="https://github.com/ysmoradi/OwinAspNetCore/blob/master/src/OwinAspNetCore/Startup.cs">https://github.com/ysmoradi/OwinAspNetC ... Startup.cs</a>

at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Compilation.BuildManager.GetReferencedAssemblies()
   at System.Web.Http.WebHost.WebHostAssembliesResolver.System.Web.Http.Dispatcher.IAssembliesResolver.GetAssemblies()
   at System.Web.Http.Dispatcher.DefaultHttpControllerTypeResolver.GetControllerTypes(IAssembliesResolver assembliesResolver)
   at System.Web.Http.WebHost.WebHostHttpControllerTypeResolver.GetControllerTypes(IAssembliesResolver assembliesResolver)
   at System.Web.Http.Dispatcher.HttpControllerTypeCache.InitializeCache()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at System.Web.Http.Dispatcher.DefaultHttpControllerSelector.InitializeControllerInfoCache()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at System.Web.Http.Dispatcher.DefaultHttpControllerSelector.GetControllerMapping()
   at System.Web.OData.Routing.Conventions.AttributeRoutingConvention.<>c__DisplayClass1.<.ctor>b__0(HttpConfiguration config)
   at System.Web.Http.HttpConfiguration.EnsureInitialized()
   at Abp.WebApi.AbpWebApiModule.PostInitialize()
   at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_2(AbpModuleInfo module)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Abp.Modules.AbpModuleManager.StartModules()
   at Abp.AbpBootstrapper.Initialize()
   at Abp.AspNetCore.AbpApplicationBuilderExtensions.InitializeAbp(IApplicationBuilder app)
   at Abp.AspNetCore.AbpApplicationBuilderExtensions.UseAbp(IApplicationBuilder app)
   at Bizzee.Web.Startup.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)

Just a quick question regarding the AppService functionality where dynamic api's are generated off the method names.

Is it possible to make it more RESTful?

For example if i have a PhoneAppService that has:

GetPhone() CreatePhone()

would be nice for the endpoints to be more restful:

GET: /api/services/app/Phone POST: /api/services/app/Phone

rather than:

GET: /api/services/app/Phone/GetPhone POST: /api/services/app/Phone/PostPhone

This is on the .net core app also, is there a way to do this?

Showing 1 to 2 of 2 entries