Csharp/C#教程:Http-handler加载错误分享


Http-handler加载错误

我在Asp.Net WebApplication中成功添加并配置了HttpHandler,但在尝试将相同的HttpHandler添加到Asp.Net WebSite时遇到了问题。 我已经在web.config中注册了它,我错过了什么

这是我得到的错误

Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Could not load type 'MyHandler'. Line 98:  Line 99:  Line 100:  Line 101:  

这是处理程序

 public class MyHandler: IHttpHandler { #region IHttpHandler Members public bool IsReusable { get { return true; } } public void ProcessRequest(HttpContext context) { } #endregion } 

注意:我没有通过url对处理程序提出任何请求,它只是不让我运行应用程序。

谢谢

编辑:我最初错过了网站:

将.cs放在App_code中并使用:

  

尝试在type属性中使用完全限定的类型名称,包括程序集名称。 像这样:

上述就是C#学习教程:Http-handler加载错误分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

  

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/951846.html

(0)
上一篇 2021年11月19日
下一篇 2021年11月19日

精彩推荐