开发者

asp.net mvc site Upload error

I have a website developed in the asp.net mvc 2 . I have this error after upload my project on public domain server.(like Godaddy)

Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, System.String, System.String, System.String)'.

The brief is :

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, System.String, System.String, System.String)'.

Source Error:

Line 50: 

< div class="nav_box" >
Line 51:            < ul >
Line 52:                < %= Html.MenuItem(Resources.Global.H开发者_StackOverflow中文版ome, "Index", "Home")%> //**Getting error here.**
Line 53:                < %= Html.MenuItem(Resources.Global.Search, "Index", "Search")%>
Line 54:                < %= Html.MenuItem(Resources.Global.Chemistry, "Chemistry", "Dating")%>

Source File: d:\hostfolder\61231230\html\test\Views\Shared\NewGeneral.Master Line: 52

Stack Trace:

[MissingMethodException: Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, System.String, System.String, System.String)'.]
   DatingScript.Helpers.MenuItemHelper.MenuItem(HtmlHelper helper, String linkText, String actionName, String controllerName) in MenuItemHelper.cs:34
   ASP.views_shared_newgeneral_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\hostfolder\6954170\html\test\Views\Shared\NewGeneral.Master:52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +59
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


Check the version number of the DLL containing the mentioned namespace and verify that you are using the correct/expected version.

I have experienced something similar today when I suddenly got the message:

"Method not found: 'System.String Sitecore.Web.WebUtil.GetSafeQueryString(System.String)'."

when trying to access the sitecore shell.

As I am developing within a development team I had to do a bit of analysis of the DLL's in the bin folder as there were no build errors in my build and the the referenced namespace is placed within a Sitecore dll.

When I compared my failing Sitecore.Kernel.dll file version with a Sitecore.Kernel.dll version from a working solution I found a difference in version number and that the Sitecore dll was copied from a repository that I had'nt updated recently.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜