Asp.net mvc 独立IIS服务器无法根据启动url/启动url/默认视图启动web应用程序
我们使用以下技术开发了ASP.NET MVC 5.2.7.0版应用程序: -ASP.NET MVC 5.2.7.0版 -.NET Framework 4.6.1 -Visual Studio 2019 我们必须将上述应用程序部署到包含独立IIS服务器的以下环境中: -32位环境 -Windows Server 2008 R2企业版(Service Pack 1) -IIS 7.5版Asp.net mvc 独立IIS服务器无法根据启动url/启动url/默认视图启动web应用程序,asp.net-mvc,iis,view,routes,url-routing,Asp.net Mvc,Iis,View,Routes,Url Routing,我们使用以下技术开发了ASP.NET MVC 5.2.7.0版应用程序: -ASP.NET MVC 5.2.7.0版 -.NET Framework 4.6.1 -Visual Studio 2019 我们必须将上述应用程序部署到包含独立IIS服务器的以下环境中: -32位环境 -Windows Server 2008 R2企业版(Service Pack 1) -IIS 7.5版 还安装了.NET Framework 4.6.1运行时和SDK -8GB内存 这是一个典型的ASP.NET M
- 还安装了.NET Framework 4.6.1运行时和SDK
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
有人能告诉我如何在独立IIS服务器上解决上述错误吗?原因可能很简单,我们需要启用某些windows功能以支持Asp.NET平台web应用程序。
如果问题仍然存在,请随时通知我 这回答了你的问题吗?Visual Studio有能力解析代码并知道使用什么作为默认页面,但IIS没有。在这个问题中,您将看到我的RouteConfig的RegisterRoutes方法已经定义了“默认”路由。但是,我仍然得到“403.14-禁止”,“没有为请求的URL配置默认文档,并且服务器上没有启用目录浏览。”仔细阅读链接的线程。这条路线不同。
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 }
); ................................... .................................................