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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:59:57+00:00 2026-05-26T00:59:57+00:00

Assume that the application is physically located at: C:\inetpub\wwwroot\MyApplication This has been converted into

  • 0

Assume that the application is physically located at:

C:\inetpub\wwwroot\MyApplication

This has been converted into an application via IIS 7.5 and I am now able to access the application via…

http://localhost/MyApplication 

…as it will engage the default route. If I make a call to…

http://localhost/MyApplication/MyRequest

…the same route is engaged and the proper page is served up. The issue is that aforementioned URL is a form and upon submitting that form I call an action within the same Controller, yet am not routed accordingly. The resulting URL is…

http://localhost/MyRequest/MyMethod

versus…

http://localhost/MyApplication/MyRequest/MyMethod

The only route within the application is…

    routes.MapRoute(
        "Default", // Route name
        "{controller}/{action}/{id}", // URL with parameters
        new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
    );

Is this a routing issue? The JS (jqueryUI, etc…) which resides in the Scripts folder is also not being loaded, it’s as if everything is set to reside at the root level within the hierarchy and adding in the MyApplication folder within IIS has thrown things for a loop.

UPDATE:

The form definition looks like…

<form class="..." action="/Request/Add" method="post" id="requestForm">
  • 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-26T00:59:58+00:00Added an answer on May 26, 2026 at 12:59 am

    I bet you have hardcoded urls in your views and scripts instead of using helpers.

    For example concerning the CSS, instead of hardcoding it like this:

    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
    

    use url helpers:

    <link href="<%= Url.Content("~/Content/Site.css") %>" rel="stylesheet" type="text/css" />
    

    and concerning your HTML forms and anchors always use HTML helper to generate them:

    <% using (Html.BeginForm()) { %>
        ...
    <% } %> 
    

    and concerning your javascript files absolutely never hardcode any urls like this:

    $.ajax({
        url: '/foo/bar',
        ...
    });
    

    You should always rely on url hepers helpers when dealing with urls in an ASP.NET MVC application. Now, no matter where your application is hosted and how your routes look like, it will work.


    UPDATE:

    And now after seeing your update, instead of hardcoding your forms:

     <form class="..." action="/Request/Add" method="post" id="requestForm">
    

    you should use html helpers to generate them:

    <% using (Html.BeginForm("Add", "Request", null, FormMethod.Post, new { id = "requestForm", @class = "foo" })) { %>
        ...
    <% } %> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All articles I've read about localization of a WinForms application assume that I already
Assume that we have N erlang nodes, running same application. I want to share
Assume that the core project has a base entity and every plugin maybe extends
Do you generally assume that toString() on any given object has a low cost
Assume that there is application that must interact with a DB of more than
We have an application that, amongst many other things, has an export to Excel
Assume that you have a running SQL Server Express instance named (local)\SQLEXPRESS. Its database
I assume that you can't use a JavaScript code snippet to validate if the
I assume that char* = string is the same to char* = new char[6]
I assume that most of the analyzing and tracking is done based on the

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.