I got the following error in my MVC application when i installed the Dynamic Data 04-23 drop.
System.TypeLoadException was unhandled by user code
Message="Could not load type 'System.Web.HttpContextWrapper2' from assembly 'System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'."
Source="System.Web.Mvc"
TypeName="System.Web.HttpContextWrapper2"
StackTrace:
at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext)
at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) in D:\tools\MVC\aspnet4143\MVC\v1\Mvc\MvcHandler.cs:line 80
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
the original mvc preview 2 dlls (System.Web.Abstractions.dll, System.Web.Mvc.dll and System.Web.Routing.dll) are in the bin dir of the mvc applicatoin.
this is expected as the Dynamic Data release has newer DLLs that MVC also depends on. Until a new drop of MVC comes out you will not be able to use the two simultaneously.
then the Readme.doc should be updated accordingly. it does today says "The private-drop release can be used on computers that have any or all of the following
releases installed: ASP.NET 3.5 Extensions Preview December CTP, ASP.NET MVC Preview 2, and Silverlight 2 SDK Beta 1.". And then a whole capter is dedicated to how to make mvc preview 2 compatible to the new drop, very confusing.
After uninstalling the latest version and then installing the suggested version of Dynamic Data all my ASP.NET MVC projects show a blank page when I try to view through Cassini.
(I'm using ASP.NET MVC Preview 2, not the latest refresh.)
When I uninstall the cached Dynamic Data assemblies the ASP.NET MVC apps work fine again.
Sorry for all the confusion. There is a note in the Readme file about compatability with MVC that causes the blank page issue and how to resolve it. This is due to some routing changes that are coming in the next release of MVC that you get a little earlier
by trying out the Dynamic Data builds. Using the workaround in the Readme the 4/8 relesae of Dynamic Data will work with MVC Preview 2.
We are working on getting all these version issues figured out moving forward though. Thanks for your patience.
Birk
Member
54 Points
41 Posts
Problems with the new Dynamic Data drop and MVC preview 2
Apr 28, 2008 09:54 PM|LINK
I got the following error in my MVC application when i installed the Dynamic Data 04-23 drop.
System.TypeLoadException was unhandled by user code
Message="Could not load type 'System.Web.HttpContextWrapper2' from assembly 'System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'."
Source="System.Web.Mvc"
TypeName="System.Web.HttpContextWrapper2"
StackTrace:
at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext)
at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) in D:\tools\MVC\aspnet4143\MVC\v1\Mvc\MvcHandler.cs:line 80
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
the original mvc preview 2 dlls (System.Web.Abstractions.dll, System.Web.Mvc.dll and System.Web.Routing.dll) are in the bin dir of the mvc applicatoin.
Same error in both cassini and IIS7 (x64)
marcind
Contributor
3344 Points
609 Posts
Microsoft
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 28, 2008 10:38 PM|LINK
Hi Birk,
this is expected as the Dynamic Data release has newer DLLs that MVC also depends on. Until a new drop of MVC comes out you will not be able to use the two simultaneously.
ASP.NET Team
@marcind
Blog
Birk
Member
54 Points
41 Posts
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 28, 2008 11:03 PM|LINK
then the Readme.doc should be updated accordingly. it does today says "The private-drop release can be used on computers that have any or all of the following releases installed: ASP.NET 3.5 Extensions Preview December CTP, ASP.NET MVC Preview 2, and Silverlight 2 SDK Beta 1.". And then a whole capter is dedicated to how to make mvc preview 2 compatible to the new drop, very confusing.
Leapfrog
Member
7 Points
7 Posts
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 29, 2008 11:48 PM|LINK
In the same boat - not happy!
What are the dependancies - can we isolate them.
scothu
Participant
1436 Points
291 Posts
Microsoft
Moderator
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 30, 2008 12:07 AM|LINK
Temporary solution until the next drop of MVC will be to use our 4/8 build: http://code.msdn.microsoft.com/dynamicdata/Release/ProjectReleases.aspx?ReleaseId=853.which relies on the older version of routing and abstractions.
.Scott
PM, ASP.NET Team, Microsoft
Leapfrog
Member
7 Points
7 Posts
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 30, 2008 01:13 AM|LINK
Even worse I'm afraid.
After uninstalling the latest version and then installing the suggested version of Dynamic Data all my ASP.NET MVC projects show a blank page when I try to view through Cassini.
(I'm using ASP.NET MVC Preview 2, not the latest refresh.)
When I uninstall the cached Dynamic Data assemblies the ASP.NET MVC apps work fine again.
scothu
Participant
1436 Points
291 Posts
Microsoft
Moderator
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 30, 2008 06:33 AM|LINK
Sorry for all the confusion. There is a note in the Readme file about compatability with MVC that causes the blank page issue and how to resolve it. This is due to some routing changes that are coming in the next release of MVC that you get a little earlier by trying out the Dynamic Data builds. Using the workaround in the Readme the 4/8 relesae of Dynamic Data will work with MVC Preview 2.
We are working on getting all these version issues figured out moving forward though. Thanks for your patience.
Scott
PM, ASP.NET Team, Microsoft
Birk
Member
54 Points
41 Posts
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 30, 2008 08:19 AM|LINK
that's not all true, with the 4-8 drop Request.Files aint working in MVC (preview 2).. =/
scothu
Participant
1436 Points
291 Posts
Microsoft
Moderator
Re: Problems with the new Dynamic Data drop and MVC preview 2
Apr 30, 2008 04:00 PM|LINK
Here are the notes from the ReadMe that explain how to make Dynamic Data 4/8 release work with MVC Preview 2.
To convert an MVC project template project to work with the new routing changes, follow these steps:
1. In the Global.asax file, locate the following route definition:
routes.Add(new Route("Default.aspx", new MvcRouteHandler()) {
Defaults = new RouteValueDictionary(new
{ controller = "Home", action = "Index", id = "" }), });
2. Remove the route and substitute the following route definition:
routes.Add(new Route("", new MvcRouteHandler())
{
Defaults = new RouteValueDictionary(new
{ controller = "Home", action = "Index", id = "" }),
});
3. Make sure that the Default.aspx file contains the following code:
<!--
This file ensures that ASP.NET MVC is activated when a user makes a "/" request to Cassini.
You do not need to deploy this file to IIS 7.
-->
<% Response.Redirect("~/Home") %>
4. Make the following highlighted change to the default route:
routes.Add(new Route("{controller}/{action}/{id}", new MvcRouteHandler()) {
Defaults = new RouteValueDictionary(new { action = "Index", id = "" }),
Constraints = new RouteValueDictionary(new {controller=@"[^\.]*"})PM, ASP.NET Team, Microsoft
Leapfrog
Member
7 Points
7 Posts
Re: Problems with the new Dynamic Data drop and MVC preview 2
May 06, 2008 12:16 AM|LINK
This works fine as a temporary solution.
Thanks