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 6730189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:22:41+00:00 2026-05-26T10:22:41+00:00

This works on my dev machine, but not on a production server. I am

  • 0

This works on my dev machine, but not on a production server. I am trying to update some divs with ajax, but they are not updated, though other parts work fine. I am using IIS 6 on the server.
When I debug this code on the server side with firebug, it does not hit any breakpoints I add to the success function.

Script:

function updateServiceInfo(nodeId) {
        var id = { id: nodeId };
        $.ajax({
            url: '/ServiceInfo/ServiceInfoPartial',
            type: 'GET',
            data: id,
            dataType: 'html',
            success: function (data) {
                $('#serviceInfoContent').html(data);
            },
    error: function (request, error) {

    }
        });
    }

Controller:

 public class ServiceInfoController : Controller
    {
        public ActionResult ServiceInfo()
        {
            return PartialView("ServiceInfo");
        }

        public ActionResult ServiceInfoPartial(string id)
        {
            return PartialView("ServiceInfoPartial");
        }
    }

Views:

serviceinfopartial

@model string
<p>
    Немає опису</p>

serviceinfo

<div id="serviceInfo">
    <div id="ContainerPanel" class="ContainerPanel">
        <div id="serviceInfoHeader" class="collapsePanelHeader">
            <div id="dvHeaderText" class="HeaderContent">
                Опис сервісу</div>
            <div id="dvArrow" class="ArrowClose">
            </div>
        </div>
        <div id="serviceInfoContent" class="serviceInfoContent">

        </div>
    </div>
</div>

The response that is returned in the console is

GET http://localhost/Managers/GetManagers?nodeId=563344 404 Not Found 42ms
  • 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-26T10:22:42+00:00Added an answer on May 26, 2026 at 10:22 am

    Ahhhhhhhhhhhhhh, another hardcoded url:

    url: '/ServiceInfo/ServiceInfoPartial',
    

    Never hardcode urls like this in an ASP.NET MVC application.

    Always use url helpers to generate them:

    url: '@Url.Action("ServiceInfoPartial", "ServiceInfo")',
    

    or if this is in a separate javascript file where you cannot use url helpers simply use HTML5 data-* attributes on some DOM element:

    <div id="serviceInfo" data-url="@Url.Action("ServiceInfoPartial", "ServiceInfo")">
    ...
    </div>
    

    and then in your javascript simply:

    url: $('#serviceInfo').data('url'),
    

    The reason your code doesn’t work when you host it in IIS is because in IIS you are probably hosting your application in a virtual directory so the correct url is no longer /ServiceInfo/ServiceInfoPartial but is /YourAppName/ServiceInfo/ServiceInfoPartial. That’s the reason why you should never hardcode any url and use helpers to generate them => it’s because helpers handle this cases. Another benefit of using helpers is that if you later decide to change the layout of your routes in Global.asax you won’t need to modify all your javascript files, etc… Your url managment is centralized in a single location.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This works in my dev machine, but not on my actual production server. I'm
I'm trying to set some configurations for HTMLPurifier, and everything works on my dev
I've used NUnit before, but not in a while, and never on this machine.
On my local dev machine this works perfectly: msbuild project.name.csproj /p:DeployOnBuild=true /p:DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir=c:\proyectos\folder1\deploy /p:AutoParameterizationWebConfigConnectionStrings=false
Not sure what has happened on my dev machine but I can barely use
This works, but is it the proper way to do it??? I have a
This works: Tweener.addTween( [ _fee, _fye, _fum ] , { alpna:1, time:10 }); But
This works: #include <iostream> using namespace std; but this fails: #include <stdio> When is
This works: var.replace(/[^0-9]+/g, ''); That simple snippet will replace anything that is not a
This works : alert(document.getElementById(Container).nodeName); But this doesnt : var CurParent = document.getElementById(Container); alert(CurParent.nodeName); I

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.