2011-11-07 152 views
0

虽然尝试Microsoft WebMatrix日历模板,它在本地工作没有任何问题,但是当我在主机服务器中尝试相同时,它不起作用,并给出以下错误:ASP._Page_default_cshtml.Execute()':找不到合适的方法来覆盖

编译器错误消息: 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: 

回答

-1

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

+0

谢谢。是的,我通过Webmatrix部署。 – Hoque

+0

那么,如果它在本地工作,但不是在发布时,那么可能在您部署到的服务器上配置错误。它是共享主机还是您自己的服务器? –

+0

再次感谢你。它是一个共享主机。 – Hoque