Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
$Get.Json return 404 after publishing project to iis

Hi I am calling a get json to receive data and after I publish my project to IIS server the below request suddenly gives me an 404 error. Everything works fine in visual studio.

    public IActionResult GetDataAll()
    {
        using (PrognoseDbContext prognoseDbContext = new PrognoseDbContext())
        {

            var data1 = prognoseDbContext.CprPrognoseSamlet.ToList();
            return Json(data1);

        }                                  
    }

I can read from other posts that I shouldn't hardcode the URL because that can cause issues so I tried not to but it still does not work. So how can I fix the problem?

This is my javascript calling my controller:

$.getJSON( "@Url.Action("GetDataAll", "Home")", function (data1) 

This is the error I get:

Failed to load resource: the server responded with a status of 404 (Not Found) at Object. (highcharts.src.js:224) at B (highcharts.src.js:1668) at Object.r [as error] (highcharts.src.js:246) at highstock.src.js:21 at highstock.src.js:9

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda