Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6815153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:46:23+00:00 2026-05-26T20:46:23+00:00

I have no idea why my action is not being hit. This controller is

  • 0

I have no idea why my action is not being hit. This controller is under an “Area” called api.

$.ajax({
            url: defaults.url + (defaults.url.indexOf('?') > 0 ? '&' : '?') + 'r=' + Math.random(),
            type: defaults.method,
            contentType: 'application/json',
            dataType: 'json',
            data: defaults.data,

            success: function (data) {


    public class EventController : Controller
        {
            [JsonpFilter(Order = 1)]
            public JsonResult Register()
            {

                return new JsonResult
                {
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet,
                    Data = new ApiRegistrationResponse()
                };
            }
        }

[AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
    public class JsonpFilterAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            if (filterContext == null)
                throw new ArgumentNullException("filterContext");

            string callback = filterContext.HttpContext.Request.QueryString["callback"];

            if (!string.IsNullOrEmpty(callback))
            {
                var result = filterContext.Result as JsonResult;
                if (result == null)
                {
                    throw new InvalidOperationException("JsonpFilterAttribute must be applied only " +
                        "on controllers and actions that return a JsonResult object.");
                }

                filterContext.Result = new JsonpResult
                {
                    ContentEncoding = result.ContentEncoding,
                    ContentType = result.ContentType,
                    Data = result.Data,
                    Callback = callback
                };
            }
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:46:24+00:00Added an answer on May 26, 2026 at 8:46 pm

    After trial and error I had to exclude the following ninject file NinjectMVC3.cs under the App_Start folder and it started working.

    [assembly: WebActivator.PreApplicationStartMethod(typeof(MvcApplication2.App_Start.NinjectMVC3), "Start")]
    [assembly: WebActivator.ApplicationShutdownMethodAttribute(typeof(MvcApplication2.App_Start.NinjectMVC3), "Stop")]
    
    namespace MvcApplication2.App_Start
    {
        using System.Reflection;
        using Microsoft.Web.Infrastructure.DynamicModuleHelper;
        using Ninject;
        using Ninject.Web.Mvc;
    
        public static class NinjectMVC3 
        {
            private static readonly Bootstrapper bootstrapper = new Bootstrapper();
    
            /// <summary>
            /// Starts the application
            /// </summary>
            public static void Start() 
            {
                DynamicModuleUtility.RegisterModule(typeof(OnePerRequestModule));
                DynamicModuleUtility.RegisterModule(typeof(HttpApplicationInitializationModule));
                bootstrapper.Initialize(CreateKernel);
            }
    
            /// <summary>
            /// Stops the application.
            /// </summary>
            public static void Stop()
            {
                bootstrapper.ShutDown();
            }
    
            /// <summary>
            /// Creates the kernel that will manage your application.
            /// </summary>
            /// <returns>The created kernel.</returns>
            private static IKernel CreateKernel()
            {
                var kernel = new StandardKernel();
                RegisterServices(kernel);
                return kernel;
            }
    
            /// <summary>
            /// Load your modules or register your services here!
            /// </summary>
            /// <param name="kernel">The kernel.</param>
            private static void RegisterServices(IKernel kernel)
            {
            }        
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a specific controller action that is being called twice, which aside from
I have this idea for a free backup application. The largest problem I need
I have an idea for how to solve this problem, but I wanted to
I have no idea. This causes seemingly random time-outs. These in turn break the
So we have a real-estate-related site that has controller/action pairs like homes/view, realtors/edit, and
I have this concrete problem, but if You find my initial design idea crazy
I have controller methods that look like this: class TestController < ApplicationController def testAction
I do this ajax request: var response = $.ajax({ url: 'product/add', data: $(#formAddNewRow).serialize(), type:
Anyone have idea about how to bind Boolean in sqlite with objective - c.
I have idea to write errors from my application to the Windows Event Viewer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.