I built an MVC web application (about a dozen view pages) that is working fine when run from the VS.net 2019 designer IIS Express, but when I deploy the app to local IIS and run it, I get error...
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
After weeks of checking every issue I can find, I have to ask for help form the folks here - what am I missing? Here are the steps my app uses to get its first web page to be reached...
I have index.html at the myApp home directory which invokes the first view page...
var host = window.location.host;
var protocol = window.location.protocol;
var url = protocol + "//" + host + "/myAppLogin/Login";
//alert("url: " + url);
window.location.replace(url);
Here is my RouteConfig.cs...
namespace myApp
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "myAppLogin", action = "Login", id = UrlParameter.Optional }
);
}
}
}
The myApp properties in VS.net designer shows start action specific page with index.html shown.
I copy the entire project over to C:/inetput/wwwroot
In inetMgr I startup myApp and check bindings and settings, all looks ok on port 80 (default Web Site shut down)
Next I issue this in my web browser - http://localhost/myApp/index.html which gives error...
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
the 404.0 error page shows RouteConfig.cs did its job correctly...
Requested URL http://localhost:80/myAppLogin/Login
Physical Path C:\inetpub\wwwroot\myApp\myAppLogin\Login Logon
Method Anonymous
Logon User Anonymous
Some other settings that might be appropriate...
Windows 11 pro IIS version 10.0.26100.1 DefaultAppPool .net CLR version v4.0 identity is NetworkService
myApp .net CLR version is v4.0 and identity is NetworkService
myApp web site has physical path C:\inetpub\wwwroot\myApp defaultAppPool and pass-through authentication.
Thanks for any help.
Jay