ASP._Page_default_cshtml.Execute()':找不到合适的方法来覆盖

发布于 2024-12-13 18:21:12 字数 2597 浏览 4 评论 0原文

在尝试 Microsoft WebMatrix 日历模板时,它可以在本地正常工作,没有任何问题,但当我在主机服务器中尝试相同的操作时,它不起作用并给出以下错误:

编译器错误消息: > CS0115: 'ASP._Page_default_cshtml.Execute()': 找不到合适的方法来覆盖

Line 41:         }
Line 42:         
Line 43:         public override void Execute() {
Line 44: 
Line 45:  

完整的编译源是:

Line 1:    #pragma checksum "E:\web\nazmulwebco\htdocs\ical\default.cshtml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "91704A43AA481FE0EBCE348C223AE605"
Line 2:    //------------------------------------------------------------------------------
Line 3:    // <auto-generated>
Line 4:    //     This code was generated by a tool.
Line 5:    //     Runtime Version:4.0.30319.239
Line 6:    //
Line 7:    //     Changes to this file may cause incorrect behavior and will be lost if
Line 8:    //     the code is regenerated.
Line 9:    // </auto-generated>
Line 10:   //------------------------------------------------------------------------------
Line 11:   
Line 12:   namespace ASP {
Line 13:       using System;
Line 14:       using System.Collections.Generic;
Line 15:       using System.IO;
Line 16:       using System.Linq;
Line 17:       using System.Net;
Line 18:       using System.Web;
Line 19:       using System.Web.Helpers;
Line 20:       using System.Web.Security;
Line 21:       using System.Web.UI;
Line 22:       using System.Web.WebPages;
Line 23:       using System.Web.WebPages.Html;
Line 24:       using WebMatrix.Data;
Line 25:       using WebMatrix.WebData;
Line 26:       using Microsoft.Web.Helpers;
Line 27:       
Line 28:       
Line 29:       public class _Page_default_cshtml {
Line 30:           
Line 31:   #line hidden
Line 32:   
Line 33:           
Line 34:           public _Page_default_cshtml() {
Line 35:           }
Line 36:           
Line 37:           protected System.Web.HttpApplication ApplicationInstance {
Line 38:               get {
Line 39:                   return ((System.Web.HttpApplication)(Context.ApplicationInstance));
Line 40:               }
Line 41:           }
Line 42:           
Line 43:           public override void Execute() {
Line 44:   
Line 45:               
Line 46:               #line 1 "E:\web\nazmulwebco\htdocs\ical\default.cshtml"
Line 47:     
Line 48:       // Redirect to the initial main page
Line 49:       Response.Redirect("~/Calendar");
Line 50:   
Line 51:               
Line 52:               #line default
Line 53:               #line hidden
Line 54:   
Line 55:           }
Line 56:       }
Line 57:   }
Line 58:  

While trying Microsoft WebMatrix Calendar Template, it works locally without any trouble but when I try the same in host server, it does not work and giving the following error:

Compiler Error Message: CS0115: 'ASP._Page_default_cshtml.Execute()': no suitable method found to override

Line 41:         }
Line 42:         
Line 43:         public override void Execute() {
Line 44: 
Line 45:  

The complete compilation source is:

Line 1:    #pragma checksum "E:\web\nazmulwebco\htdocs\ical\default.cshtml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "91704A43AA481FE0EBCE348C223AE605"
Line 2:    //------------------------------------------------------------------------------
Line 3:    // <auto-generated>
Line 4:    //     This code was generated by a tool.
Line 5:    //     Runtime Version:4.0.30319.239
Line 6:    //
Line 7:    //     Changes to this file may cause incorrect behavior and will be lost if
Line 8:    //     the code is regenerated.
Line 9:    // </auto-generated>
Line 10:   //------------------------------------------------------------------------------
Line 11:   
Line 12:   namespace ASP {
Line 13:       using System;
Line 14:       using System.Collections.Generic;
Line 15:       using System.IO;
Line 16:       using System.Linq;
Line 17:       using System.Net;
Line 18:       using System.Web;
Line 19:       using System.Web.Helpers;
Line 20:       using System.Web.Security;
Line 21:       using System.Web.UI;
Line 22:       using System.Web.WebPages;
Line 23:       using System.Web.WebPages.Html;
Line 24:       using WebMatrix.Data;
Line 25:       using WebMatrix.WebData;
Line 26:       using Microsoft.Web.Helpers;
Line 27:       
Line 28:       
Line 29:       public class _Page_default_cshtml {
Line 30:           
Line 31:   #line hidden
Line 32:   
Line 33:           
Line 34:           public _Page_default_cshtml() {
Line 35:           }
Line 36:           
Line 37:           protected System.Web.HttpApplication ApplicationInstance {
Line 38:               get {
Line 39:                   return ((System.Web.HttpApplication)(Context.ApplicationInstance));
Line 40:               }
Line 41:           }
Line 42:           
Line 43:           public override void Execute() {
Line 44:   
Line 45:               
Line 46:               #line 1 "E:\web\nazmulwebco\htdocs\ical\default.cshtml"
Line 47:     
Line 48:       // Redirect to the initial main page
Line 49:       Response.Redirect("~/Calendar");
Line 50:   
Line 51:               
Line 52:               #line default
Line 53:               #line hidden
Line 54:   
Line 55:           }
Line 56:       }
Line 57:   }
Line 58:  

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

混浊又暗下来 2024-12-20 18:21:12

那不应该发生。你是通过WebMatrix部署的吗?它将验证您是否在 Web 服务器上配置了所有正确的功能,并确保部署了所有正确的文件。

That shouldn't happen. Did you deploy via WebMatrix? It will verify you have all the right features configured on your web server as well as make sure all the right files get deployed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文