I have a issue to access the WEBAPI. Webscreen is working.
Error in Postman:
"code": "InternalServerError",
"message": {
"lang": "en-US",
"value": "Internal Server Error"
}
}
Trace Log error:
Timestamp: 3/24/2025 2:33:54 PM
Message: Error-[Tenant:] [Company:] [Module:] [User:] - Sage 300 Web API encountered an error for Url '90.90.90.248/.../ARCustomers'.:
(Inner Exception)
(Inner Exception)
Exception Source: EntityFramework
Exception Type: System.BadImageFormatException
Exception Message: Bad IL range.
---- Stack Trace ----
System.Data.Entity.Core.Metadata.Edm.GlobalItem..ctor() in EntityFramework.dll
System.Data.Entity.Core.Metadata.Edm.StructuralType..ctor() in EntityFramework.dll
System.Data.Entity.Core.Metadata.Edm.ComplexType..ctor() in EntityFramework.dll
System.Data.Entity.Core.Metadata.Edm.MetadataItem..cctor() in EntityFramework.dll
(Outer Exception)
Exception Source: EntityFramework
Exception Type: System.TypeInitializationException
Exception Message: The type initializer for 'System.Data.Entity.Core.Metadata.Edm.MetadataItem' threw an exception.
---- Stack Trace ----
System.Data.Entity.Core.Metadata.Edm.PrimitiveType.GetEdmPrimitiveTypes() in EntityFramework.dll
System.Data.Entity.Utilities.TypeExtensions..cctor() in EntityFramework.dll
(Outer Exception)
Exception Source: EntityFramework
Exception Type: System.TypeInitializationException
Exception Message: The type initializer for 'System.Data.Entity.Utilities.TypeExtensions' threw an exception.
---- Stack Trace ----
System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForContext(Type contextType) in EntityFramework.dll
System.Data.Entity.DbContext.InitializeLazyInternalContext(IInternalConnection internalConnection, DbCompiledModel model) in EntityFramework.dll
System.Data.Entity.DbContext..ctor(String nameOrConnectionString) in EntityFramework.dll
Sage.CA.SBS.ERP.Sage300.Common.BusinessRepository.Landlord.LandlordDbContext..ctor() in Sage.CA.SBS.ERP.Sage300.Common.BusinessRepository.dll,file: LandlordDbContext.cs,line: 0026
Sage.CA.SBS.ERP.Sage300.Common.BusinessRepository.Landlord.LandlordRepositoryBase.Get(Guid productUserId, Guid tenantId) in Sage.CA.SBS.ERP.Sage300.Common.BusinessRepository.dll,file: LandlordRepositoryBase.cs,line: 0024
Sage.CA.SBS.ERP.Sage300.Common.Services.Landlord.LandlordService.Get(Guid productUserId, Guid sageTenantId) in Sage.CA.SBS.ERP.Sage300.Common.Services.dll,file: LandlordService.cs,line: 0039
Sage.CA.SBS.ERP.Sage300.Common.Web.Security.UserTenantResolverOnPremise.ResolveUserTenant(IUnityContainer container, Context context, String company, String userId, SecureString passwordSStr, List`1 companies) in Sage.CA.SBS.ERP.Sage300.Common.Web.dll,file: UserTenantResolverOnPremise.cs,line: 0060
Sage.CA.SBS.ERP.Sage300.Common.WebApi.Controllers.ResourceController.SetContext() in Sage.CA.SBS.ERP.Sage300.Common.WebApi.dll,file: ResourceController.cs,line: 0055
Sage.CA.SBS.ERP.Sage300.Common.WebApi.Controllers.ViewResourceController`1.InitializeRepository(Boolean forWriteAccess) in Sage.CA.SBS.ERP.Sage300.Common.WebApi.dll,file: ViewResourceController.cs,line: 0247
Sage.CA.SBS.ERP.Sage300.Common.WebApi.Controllers.ViewResourceController`1.Post(TModel model) in Sage.CA.SBS.ERP.Sage300.Common.WebApi.dll,file: ViewResourceController.cs,line: 0187
(Closure , Object , Object[] ) in <In Memory Module>
System.Web.Http.Controllers.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) in System.Web.Http.dll
System.Web.Http.Controllers.ActionExecutor.Execute(Object instance, Object[] arguments) in System.Web.Http.dll
System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) in System.Web.Http.dll
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in mscorlib.dll
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in mscorlib.dll
System.Web.Http.Controllers.<InvokeActionAsyncCore>d__0.MoveNext() in System.Web.Http.dll
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in mscorlib.dll
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in mscorlib.dll
System.Web.Http.Filters.<CallOnActionExecutedAsync>d__5.MoveNext() in System.Web.Http.dll
System.Web.Http.Filters.<CallOnActionExecutedAsync>d__5.MoveNext() in System.Web.Http.dll
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in mscorlib.dll
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in mscorlib.dll
System.Web.Http.Filters.<ExecuteActionFilterAsyncCore>d__0.MoveNext() in System.Web.Http.dll
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in mscorlib.dll
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in mscorlib.dll
System.Web.Http.Controllers.<ExecuteAsync>d__2.MoveNext() in System.Web.Http.dll
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in mscorlib.dll
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in mscorlib.dll
System.Web.Http.Filters.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext() in System.Web.Http.dll
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in mscorlib.dll
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in mscorlib.dll
System.Web.Http.Controllers.<ExecuteAsync>d__0.MoveNext() in System.Web.Http.dll
Any suggestions?
Regards,