Closed dev-day closed 1 year ago
Hi, what version, and what framework target are you using?
Could you also post the full exception stack trace if possible
Thanks,
Hi,
Thank you fo getting back to me,
It's .NET Framework 4.7 and using .NETJSON v 1.3.2
Every time we publish the webapp to Azure, we get the error but on refresh, it goes away and doesn't come back until we restart or republish.
The full stack trace is below.
1PlansClass.SetPlans(Char* , Int32& , Plans , String , NetJSONSettings ) +0 List
1PlansClass.CreateClassOrDictPlans(Char , Int32& , NetJSONSettings ) +644 List`1PlansClass.CreateListListPlans(Char , Int32& , NetJSONSettings ) +112 List1PlansClass.ReadListPlans(String , NetJSONSettings ) +57 List
1PlansClass.Deserialize(String , NetJSONSettings ) +11 NetJSON.NetJSON.Deserialize(String json, NetJSONSettings settings) +58 Nuqlium.v2.Models.BillingFunctions.ListPlans(String currentPlan, String path, String BespokePlan) in H:\Workspaces\Nuqlium\Nuqlium.v2\Nuqlium.v2.Shared\Models_Core\Billing\BillingFunctions.cs:317 Nuqlium.v2.Controllers.BaseController.Initialize(RequestContext requestContext) in H:\Workspaces\Nuqlium\Nuqlium.v2\Nuqlium.v2\Controllers\BaseController.cs:184 System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +157 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +16 System.Web.Mvc.<>c.1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30 System.Web.Mvc.Async.WrappedAsyncResultBase
1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +427 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +443 System.Web.<>c__DisplayClass285_0.Regards, Dev
It looks like the issue might be related to multiple threads in your application trying to generate the assembly for the type.
You should consider doing the following as described here: NetJSON.GenerateTypesInto(string asmName, params Type[] types)
Using the above let you gain better performance by allowing you to distribute an assembly that contains the types you want and with the assembly name of your chosen.
Does the suggestion help or are you looking for a different solution that will prevent the startup issue?>
Hi rpgmaker,
Thank you for your help and thank you for the follow up too.
I have a high volume of types, so I don't think it's suitable for my application to list all of them. The tenantClass error only happens on first load.
I'm examining other solutions - I may have some additional questions for you!
Regards, Dev
If you can create a simple project reproducing this issue then I can try to find a better solution for you.
I have not forgotten about this. Just been busy recently.
Is this still an issue?
Closing issue. Reopen if it is still need @dev-day
Hi,
When I compile the web app, on first click, I get this error. Refreshing, the error goes away for good.
Could not load type 'TenantClass' from assembly 'NetJSONGeneratedAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
When I restart the app, the error comes back once, and then goes away again after refresh.
Is there a specific setting I need to apply to prevent this?
Regards, Dev