Base solution for your next web application
Open Closed

OData integration for 'ASP.Net Core' template #3125


User avatar
0
SperseDev created

Hi!

We have tried to integrate OData for project with 'ASP.NET Core & Angular 2+' template like described in the documentation: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/OData-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a>

When We added reference to Abp.Web.Api.OData package and specified depended module AbpWebApiODataModule to WebCoreModule (or WebHostModule) we have received exception on application startup:

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
	app.UseAbp(); <=EXCEPTION!
	...
}

Message: System.NullReferenceException: 'Object reference not set to an instance of an object.' Source: mscorlib StackTrace: at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str, Boolean onlyCheckExtras)

It is posible to integrate OData with ASP.NET Core? What we are doing wrong?

Thanks


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    The current OData document is for ASP.NET Web API, it is not for ASP.NET Core. Instead of following that document, you can search on the web for using OData with ASP.NET Core.

    Thanks.