【问题标题】:MVC web application with HTML page带有 HTML 页面的 MVC Web 应用程序
【发布时间】:2019-06-11 17:32:43
【问题描述】:

我有一个带有信息控制器的 MVC Web 应用程序。我想使用文件夹结构 webapp/info 在 iis 中添加一些 html 文档文件。当我这样做时,我收到了 ManagedPipelineHandler 错误。

我需要在项目中添加什么内容吗?我要更换控制器吗?

    HTTP Error 500.0 - Internal Server Error

    Internal Server Error



    Most likely causes:
    •IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
    •IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
    •IIS was not able to process configuration for the Web site or application.
    •The authenticated user does not have permission to use this DLL.
    •The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.



    Things you can try:
    •Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
    •Check the event logs to see if any additional information was logged.
    •Verify the permissions for the DLL.
    •Install the .NET Extensibility feature if the request is mapped to a managed handler.
    •Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here. 


Detailed Error Information:



Module
   ManagedPipelineHandler 

Notification
   ExecuteRequestHandler 

Handler
   ExtensionlessUrlHandler-Integrated-4.0-FHIR 

Error Code
   0x800703e9 



Requested URL
   https://test.bjc.com:443/info/index.html 

Physical Path
   D:\inetpub\wwwroot\Test\info\index.html 

Logon Method
   Anonymous 

Logon User
   Anonymous 

【问题讨论】:

  • 你能包含错误文本吗?
  • @Steve0 错误包括

标签: asp.net-mvc model-view-controller


【解决方案1】:

尝试忽略到文件夹的路由,例如

public static void RegisterRoutes(RouteCollection routes)
{  
    routes.IgnoreRoute("info/");
}

例如:

ASP.NET MVC Routing to start at html page

https://www.c-sharpcorner.com/UploadFile/f82e9a/ignore-route-in-mvc/

【讨论】:

猜你喜欢
  • 2019-01-23
  • 1970-01-01
  • 1970-01-01
  • 2013-10-10
  • 2011-12-23
  • 1970-01-01
  • 2017-09-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多