在尝试 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:
答案 0 :(得分:-1)
这不应该发生。您是通过WebMatrix部署的吗?它将验证您是否在Web服务器上配置了所有正确的功能,并确保部署了所有正确的文件。