Search code examples
asp.net-coreiistoast

ASP.Net Core - Toast notification not showing on deployed application


I made a few applications using aspnet core (version 2.0 and 2.2) and i added a server side notification using toastr (i used this plugin and followed the guide as shown in the link to pop up the notifications). Everything works fine when i debug using visual studio, but when i deploy the application the notifications never pop up and i don't have any feedback. Is there an application pool configuration or setting somewhere to make them work as in local environment?

I would show you some code, but it's pretty much the same as the guide i followed. In case of need, tell me if i have to show you some code or anything else. Thanks in advance


Solution

  • I actually found a solution to my problem. In the startup.cs file in the Configure method, it's apparently necessary put app.UseCookiePolicy(); method AFTER app.UseMvc and the notification work like a charm. I still don't understand why in my local PC the notification worked anyway.