2011-11-07 41 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

相關問題