• 0

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /var/www/html/cnasolution/site/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/site/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/site/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

ASP.NET MVC AJAX call Application/Controller/Action?

An Ajax call works fine in Visual Studio 2019 debug but when deployed Fiddler shows that the calls to controller calls follow 'Application/Controller/Action' routing but the Ajax call to the controller doesn't add the web app name and so the controller action isn't found.

This is what the routing file contains:

 public class RouteConfig     {         public static void RegisterRoutes(RouteCollection routes)         {             routes.IgnoreRoute("{resource}.axd/{*pathInfo}");              routes.MapRoute(                 name: "Default",                 url: "{controller}/{action}/{id}",                 defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }             );         }     } 

IMAGE Fiddler Ajax Error

Thanks for your help

Download script demo [LINK] [Origin]
Download script demo [LINK 2] [Onedrive] Download script demo [LINK 2] [Google drive]