2009-07-31 4 views
4

たっぷりのロードに失敗MVC 1.0から、私のサイトをアップグレードするため、ロードが、私はクエリ文字列を使用するページに行けば、私はこのエラーを取得する:MVC 2プレビュー1 - コントローラのパラメータを持つメソッドは、ページの

[EntryPointNotFoundException: Entry point was not found.] 
System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +219 
System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +109 
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +399 
System.Web.Mvc.Controller.ExecuteCore() +126 
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +27 
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7 
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +151 
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57 
System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 

編集

私は、これはMVC 2はので、私はDefaultControllerFactoryを変えたが、私はのStructureMapは問題ではないので、DBからデータをプルすることができたモデルを破ったとしてのStructureMapに関連していたと思いましたか?

protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType) 
    { 
     try 
     {     
      return ObjectFactory.GetInstance(controllerType) as Controller; 

     } 
     catch (StructureMapException) 
     { 
      System.Diagnostics.Debug.WriteLine(ObjectFactory.WhatDoIHave()); 
      throw; 
     } 
    } 
+0

同じ問題が少し解消されましたが、私にとってはそれは問題のコントローラーではありません。私のHomeControllerのIndexメソッドにパラメータがあるからです。 –

+0

そうです。パラメータ付きのメソッドでのみ発生します。私はデータベースからデータを呼び出してページに表示することができますので、構造マップは機能しています。どこに問題がありますか? :/ – KevinUK

答えて

2

あなたのプロジェクトにアセンブリバインディングを追加しましたか?私はほぼ同じエラーがあり、それは私にとって問題を解決します。リリースノートより:

4. If the project references any third-party libraries that are compiled against ASP.NET MVC 1.0, add the following bindingRedirect element to the Web.config file in the application root under the configuaton section: 
<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
     <assemblyIdentity name="System.Web.Mvc" 
      publicKeyToken="31bf3856ad364e35"/> 
     <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/> 
    </dependentAssembly> 
    </assemblyBinding> 
</runtime> 
+0

ありがとうございました。ああ、私は思った、私はプロジェクトを再コンパイルし、dllを再バインドする必要があります。私は自分で書いたことのないDLLを考えようとしていました! – KevinUK

関連する問題