We developed an ASP.NET MVC version 5.2.7.0 application using the following technologies:
-ASP.NET MVC version 5.2.7.0
-.NET Framework 4.6.1
-Visual Studio 2019
We have to deploy said application to the following environment that contains a standalone IIS Server:
-32-bit Environment
-Windows Server 2008 R2 Enterprise (Service Pack 1)
-IIS Version 7.5
- Also installed .NET Framework 4.6.1 Runtime and SDK
-8 GB RAM
It's a typical ASP.NET MVC setup and configuration:
public class WebApiApplication : System.Web.HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); } } public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); ................................... .................................................
.........................................................
It works when I run it in Visual Studio 2019 debug mode because it shows the default landing page with Application title.
However, when I deploy it to the standalone IIS Server, and just click "Browse" in IIS Manager, I get the following error:
HTTP Error 403.14 - Forbidden
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
It's really strange because the on the standalone IIS Server, the application in question has a bin directory that contains the Necessary files needed for ASP.NET MVC:
System.Web.Helpers.dll System.Web.Http.dll System.Web.Http.WebHost.dll System.Web.Mvc.dll System.Web.Optimization.dll System.Web.Razor.dll System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll System.Web.WebPages.Razor.dll System.Xml.ReaderWriter.dll System.Xml.XDocument.dll System.Xml.XmlDocument.dll System.Xml.XmlSerializer.dll System.Xml.XPath.dll System.Xml.XPath.XDocument.dll
Could someone please tell me how to resolve the aforementioned error on the standalone IIS SErver?