I have encountered an issue with my JavaScript code within script tags in my ASP.NET MVC project. Everything runs smoothly, but as soon as I include the Authorize keyword in my controller, the JavaScript stops working. Strangely, I have been unable to find any information about this problem online.
Take a look at my controller snippet:
namespace PROJECT.Controllers
{
[Authorize]
public class HomeController : Controller
{
The problem persists even when I try to use the Authorize keyword on specific controller methods rather than globally. I am unsure how to properly use the Authorize keyword or find an alternative solution that allows my JavaScript to function as intended.
If anyone has any insights or suggestions, I would greatly appreciate the assistance.